[webkit-reviews] review granted: [Bug 33158] Refactor JSC API entry/exit to use RAII instead of copy/pasting code. : [Attachment 45805] The patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jan 4 11:04:46 PST 2010


Sam Weinig <sam at webkit.org> has granted Gavin Barraclough
<barraclough at apple.com>'s request for review:
Bug 33158: Refactor JSC API entry/exit to use RAII instead of copy/pasting
code.
https://bugs.webkit.org/show_bug.cgi?id=33158

Attachment 45805: The patch
https://bugs.webkit.org/attachment.cgi?id=45805&action=review

------- Additional Comments from Sam Weinig <sam at webkit.org>
>      JSObject* jsThisObject = toJS(thisObject);
>  
>      // evaluate sets "this" to the global object if it is NULL
>      JSGlobalObject* globalObject = exec->dynamicGlobalObject();
>      SourceCode source = makeSource(script->ustring(), sourceURL->ustring(),
startingLineNumber);
> -    Completion completion = evaluate(globalObject->globalExec(),
globalObject->globalScopeChain(), source, jsThisObject);
> +    Completion completion = evaluate(exec, globalObject->globalScopeChain(),
source, jsThisObject);

This seems unrelated and should be removed from this patch.

>  JSType JSValueGetType(JSContextRef ctx, JSValueRef value)
>  {
>      JSC::ExecState* exec = toJS(ctx);
> -    exec->globalData().heap.registerThread();
> -    JSC::JSLock lock(exec);
> +    JSC::APIEntryShim entryShim(exec);

The JSC:: should not be needed here.


r=me if you change these.


More information about the webkit-reviews mailing list