[Webkit-unassigned] [Bug 89042] New: [V8] V8ArrayBufferViewCustom.cpp uses unnecessary v8::Script::Compile

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jun 13 15:14:42 PDT 2012


           Summary: [V8] V8ArrayBufferViewCustom.cpp uses unnecessary
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Unspecified
        OS/Version: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: HTML DOM
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: arv at chromium.org
                CC: kbr at google.com

This code looks suspicious.

v8::Handle<v8::Value> installHiddenCopyMethod(v8::Handle<v8::Object> prototype) {
    v8::TryCatch tryCatch;
    String source(reinterpret_cast<const char*>(V8ArrayBufferViewCustomScript_js),
    v8::Handle<v8::Script> script = v8::Script::Compile(v8String(source));
    v8::Handle<v8::Value> value = script->Run();
    v8::Handle<v8::String> key = v8::String::New(hiddenCopyMethodName);
    prototype->SetHiddenValue(key, value);
    return value;

We should not invoke the compiler for this. We can just write the same code in C++.

Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

More information about the webkit-unassigned mailing list