[Webkit-unassigned] [Bug 79851] Return value from executed script in Chromium.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Apr 10 16:43:30 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=79851





--- Comment #27 from Eriq Augustine <eaugusti at chromium.org>  2012-04-10 16:43:29 PST ---
(From update of attachment 133928)
View in context: https://bugs.webkit.org/attachment.cgi?id=133928&action=review

>> Source/WebCore/ChangeLog:8
>> +        Providing a varaiant of evaluateScriptInIsolatedWorld that
> 
> typo: varaiant

done.

>> Source/WebKit/chromium/public/WebFrame.h:279
>> +        int extensionGroup, WebVector<v8::Handle<v8::Value> >* results) = 0;
> 
> Should we be more specific that these are local handles?

Yes, I think we should. Doing this should make it clear to the caller that they need their own HandleScope.

>> Source/WebKit/chromium/src/WebFrameImpl.cpp:906
>> +    }
> 
> Is this code copy/pasted from somewhere?  Should we share code instead?

It's from WebFrameImpl::executeScriptInIsolatedWorld. Do you think it is worth it?

>> Source/WebKit/chromium/src/WebFrameImpl.cpp:909
>> +        Vector<ScriptValue> scriptResults;
> 
> Do we really need to round-trip through ScriptValue?  Both the caller and the callee of this function always use V8, so it seems like we could just pass the vector directly.

Discussed in IRC. ScriptValue bundles the value in a Persistent which helps the hand-off to the caller's HandleScope.
This is only an issue because the Vector is passed by reference instead of by value.

-- 
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