Summary: | toThis() on a JSWorkerGlobalScope should return a JSProxy and not undefined | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Michael Saboff <msaboff> | ||||||||||||||||
Component: | JavaScriptCore | Assignee: | Michael Saboff <msaboff> | ||||||||||||||||
Status: | RESOLVED FIXED | ||||||||||||||||||
Severity: | Normal | CC: | buildbot, cdumez, commit-queue, esprehn+autocc, kondapallykalyan, rniwa | ||||||||||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||||||||||
Version: | 528+ (Nightly build) | ||||||||||||||||||
Hardware: | All | ||||||||||||||||||
OS: | All | ||||||||||||||||||
URL: | https://developer.mozilla.org/en-US/demos/detail/zen-photon-garden/launch | ||||||||||||||||||
Bug Depends on: | 130553 | ||||||||||||||||||
Bug Blocks: | |||||||||||||||||||
Attachments: |
|
Description
Michael Saboff
2014-03-20 18:40:49 PDT
Created attachment 227382 [details] Patch This patch depends on <https://bugs.webkit.org/show_bug.cgi?id=130553> - "Change CodeGeneratorJS.pm special cases for "DOMWindow" to be general purpose" and won't build without it. Therefore the EWS bots will fail trying to build. I can resubmit this patch for testing after 130553 lands. Comment on attachment 227382 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=227382&action=review r=me with a bug fix below, and please fix the build before landing. > Source/WebCore/bindings/js/JSWorkerGlobalScopeBase.cpp:134 > + if (classInfo == JSProxy::info()) > + return static_cast<JSDedicatedWorkerGlobalScope*>(jsCast<JSProxy*>(asObject(value))->target()); This needs to be jsDynamicCast<JSDedicatedWorkerGlobalScope*> because it's not guaranteed that all proxies proxy to JSDedicatedWorkerGlobalScope. This patch needs some more work as some jsregress tests fail because of it. Created attachment 227498 [details]
Patch for Landing
Already reviewed by Geoff.
Made two small fixes to reviewed patch:
1. Eliminated ASSERT in testapi.c that the object used to create the GlobalObject is the same as the result from JSContextGetGlobalObject(context). It is now a proxy to the original object.
2. Move the call to setGlobalThis() in both JSGlobalObject::finishCreation() to after init has been called so our prototype can be created before we create the JSProxy that needs the prototype.
These changes rubber stamped by Geoff.
Comment on attachment 227498 [details] Patch for Landing Attachment 227498 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.appspot.com/results/5082087598063616 New failing tests: media/adopt-node-crash.html js/dom/global-constructors-attributes-shared-worker.html js/dom/global-constructors-attributes-dedicated-worker.html Created attachment 227510 [details]
Archive of layout-test-results from webkit-ews-15 for mac-mountainlion-wk2
The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: webkit-ews-15 Port: mac-mountainlion-wk2 Platform: Mac OS X 10.8.5
Comment on attachment 227498 [details] Patch for Landing Attachment 227498 [details] did not pass mac-ews (mac): Output: http://webkit-queues.appspot.com/results/4974679055925248 New failing tests: js/dom/global-constructors-attributes-shared-worker.html js/dom/global-constructors-attributes-dedicated-worker.html Created attachment 227513 [details]
Archive of layout-test-results from webkit-ews-08 for mac-mountainlion
The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: webkit-ews-08 Port: mac-mountainlion Platform: Mac OS X 10.8.5
Comment on attachment 227498 [details] Patch for Landing Attachment 227498 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.appspot.com/results/6342983427293184 New failing tests: js/dom/global-constructors-attributes-shared-worker.html js/dom/global-constructors-attributes-dedicated-worker.html Created attachment 227514 [details]
Archive of layout-test-results from webkit-ews-13 for mac-mountainlion-wk2
The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: webkit-ews-13 Port: mac-mountainlion-wk2 Platform: Mac OS X 10.8.5
Comment on attachment 227498 [details] Patch for Landing Attachment 227498 [details] did not pass mac-ews (mac): Output: http://webkit-queues.appspot.com/results/4779732637843456 New failing tests: js/dom/global-constructors-attributes-shared-worker.html js/dom/global-constructors-attributes-dedicated-worker.html Created attachment 227519 [details]
Archive of layout-test-results from webkit-ews-03 for mac-mountainlion
The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: webkit-ews-03 Port: mac-mountainlion Platform: Mac OS X 10.8.5
Created attachment 227568 [details]
Updated patch to fix test failures
Expect this to fix js/dom/global-constructors-attributes-dedicated-worker.html and js/dom/global-constructors-attributes-shared-worker.html.
Committed r166126: <http://trac.webkit.org/changeset/166126> Change rolled out in <http://trac.webkit.org/changeset/166248> due to page load time performance regression. Relanded in change set r166415 - <http://trac.webkit.org/changeset/166415> |