RESOLVED FIXED 101917
[V8] Replace setDOMWrapper() + setJSWrapperForDOMObject() with createDOMWrapper()
https://bugs.webkit.org/show_bug.cgi?id=101917
Summary [V8] Replace setDOMWrapper() + setJSWrapperForDOMObject() with createDOMWrapp...
Kentaro Hara
Reported 2012-11-12 03:16:09 PST
setJSWrapperForDOMObject() is always coupled with setDOMWrapper(). We can replace setDOMWrapper() + setJSWrapperForDOMObject() with createDOMWrapper(). (c.f. CREATE_DOM_WRAPPER() in JSC)
Attachments
Patch (19.68 KB, patch)
2012-11-12 03:18 PST, Kentaro Hara
no flags
Fixed crashes (32.99 KB, patch)
2012-11-13 22:56 PST, Kentaro Hara
no flags
Kentaro Hara
Comment 1 2012-11-12 03:18:21 PST
WebKit Review Bot
Comment 2 2012-11-12 04:41:46 PST
Comment on attachment 173601 [details] Patch Attachment 173601 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/14816126 New failing tests: fast/dom/undetectable-document-all.html
Kentaro Hara
Comment 3 2012-11-12 05:39:05 PST
Comment on attachment 173601 [details] Patch It looks like that special handling is needed for V8HTMLDocument::wrapInShadowObject().
Adam Barth
Comment 4 2012-11-12 09:38:12 PST
Comment on attachment 173601 [details] Patch I really like the idea.
Kentaro Hara
Comment 5 2012-11-13 22:56:31 PST
Created attachment 174081 [details] Fixed crashes
Adam Barth
Comment 6 2012-11-13 23:22:02 PST
Comment on attachment 174081 [details] Fixed crashes View in context: https://bugs.webkit.org/attachment.cgi?id=174081&action=review LGTM, assuming the tests pass. > Source/WebCore/bindings/v8/custom/V8HTMLDocumentCustom.cpp:78 > shadow->SetPrototype(wrapper); I looked into this shadow object, by the way. It's needed to support a corner case in document.all. If the web site sets document.all to some object, that object is stored in the shadow object so that when the property is deleted, the native document.all can re-appear.
WebKit Review Bot
Comment 7 2012-11-14 00:49:56 PST
Comment on attachment 174081 [details] Fixed crashes Clearing flags on attachment: 174081 Committed r134567: <http://trac.webkit.org/changeset/134567>
WebKit Review Bot
Comment 8 2012-11-14 00:50:00 PST
All reviewed patches have been landed. Closing bug.
Dominik Röttsches (drott)
Comment 9 2012-11-14 02:34:02 PST
If I am not mistaken, this is causing some bindings test failures: http://build.webkit.org/builders/EFL%20Linux%2064-bit%20Debug%20WK2/builds/5866/steps/bindings-generation-tests/logs/stdio FAIL: (V8) V8TestOverloadedConstructors.cpp --- WebCore/bindings/scripts/test/V8/V8TestOverloadedConstructors.cpp 2012-11-13 15:11:00.184439424 -0800 +++ /tmp/tmpRWboHe/V8TestOverloadedConstructors.cpp 2012-11-14 02:03:40.638908011 -0800 @@ -54,8 +54,7 @@ RefPtr<TestOverloadedConstructors> impl = TestOverloadedConstructors::create(arrayBuffer); v8::Handle<v8::Object> wrapper = args.Holder(); - V8DOMWrapper::setDOMWrapper(wrapper, &info, impl.get()); - V8DOMWrapper::setJSWrapperForDOMObject(impl.release(), wrapper, args.GetIsolate()); + V8DOMWrapper::createDOMWrapper(impl.release(), &info, wrapper, args.GetIsolate()); return wrapper; } [...]
Kentaro Hara
Comment 10 2012-11-14 02:36:09 PST
(In reply to comment #9) > If I am not mistaken, this is causing some bindings test failures: > > http://build.webkit.org/builders/EFL%20Linux%2064-bit%20Debug%20WK2/builds/5866/steps/bindings-generation-tests/logs/stdio Sorry, will fix in mins.
Kentaro Hara
Comment 11 2012-11-14 02:39:30 PST
Fixed in r134582.
Dominik Röttsches (drott)
Comment 12 2012-11-14 02:48:15 PST
Thanks!
Note You need to log in before you can comment on or make changes to this bug.