Bug 154102

Summary: JSDOMWindow::getOwnPropertySlot should not search prototype chain
Product: WebKit Reporter: Gavin Barraclough <barraclough>
Component: BindingsAssignee: Gavin Barraclough <barraclough>
Status: RESOLVED FIXED    
Severity: Normal CC: buildbot, cdumez, commit-queue, keith_miller, mark.lam, msaboff, rniwa, saam, simon.fraser
Priority: P2    
Version: Other   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=154378
Bug Depends on: 154120    
Bug Blocks:    
Attachments:
Description Flags
Patch for EWS
buildbot: commit-queue-
Archive of layout-test-results from ews101 for mac-yosemite
none
Archive of layout-test-results from ews104 for mac-yosemite-wk2
none
Archive of layout-test-results from ews114 for mac-yosemite
none
Fix
cdumez: review-
Updated patch cdumez: review+

Gavin Barraclough
Reported 2016-02-11 00:07:31 PST
"Own"
Attachments
Patch for EWS (9.76 KB, patch)
2016-02-11 00:11 PST, Gavin Barraclough
buildbot: commit-queue-
Archive of layout-test-results from ews101 for mac-yosemite (899.14 KB, application/zip)
2016-02-11 00:58 PST, Build Bot
no flags
Archive of layout-test-results from ews104 for mac-yosemite-wk2 (1.05 MB, application/zip)
2016-02-11 01:02 PST, Build Bot
no flags
Archive of layout-test-results from ews114 for mac-yosemite (863.52 KB, application/zip)
2016-02-11 01:15 PST, Build Bot
no flags
Fix (5.75 KB, patch)
2016-02-16 15:24 PST, Gavin Barraclough
cdumez: review-
Updated patch (9.06 KB, patch)
2016-02-16 17:07 PST, Gavin Barraclough
cdumez: review+
Gavin Barraclough
Comment 1 2016-02-11 00:11:40 PST
Created attachment 271049 [details] Patch for EWS
Build Bot
Comment 2 2016-02-11 00:58:04 PST
Comment on attachment 271049 [details] Patch for EWS Attachment 271049 [details] did not pass mac-ews (mac): Output: http://webkit-queues.webkit.org/results/813426 New failing tests: imported/w3c/web-platform-tests/html/dom/interfaces.html http/tests/security/window-named-valueOf.html fast/dom/Window/es52-globals.html
Build Bot
Comment 3 2016-02-11 00:58:05 PST
Created attachment 271051 [details] Archive of layout-test-results from ews101 for mac-yosemite The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews101 Port: mac-yosemite Platform: Mac OS X 10.10.5
Build Bot
Comment 4 2016-02-11 01:02:32 PST
Comment on attachment 271049 [details] Patch for EWS Attachment 271049 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.webkit.org/results/813434 New failing tests: imported/w3c/web-platform-tests/html/dom/interfaces.html http/tests/security/window-named-valueOf.html fast/dom/Window/es52-globals.html
Build Bot
Comment 5 2016-02-11 01:02:33 PST
Created attachment 271052 [details] Archive of layout-test-results from ews104 for mac-yosemite-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews104 Port: mac-yosemite-wk2 Platform: Mac OS X 10.10.5
Build Bot
Comment 6 2016-02-11 01:15:00 PST
Comment on attachment 271049 [details] Patch for EWS Attachment 271049 [details] did not pass mac-debug-ews (mac): Output: http://webkit-queues.webkit.org/results/813420 New failing tests: http/tests/security/window-named-valueOf.html fast/dom/Window/es52-globals.html
Build Bot
Comment 7 2016-02-11 01:15:01 PST
Created attachment 271053 [details] Archive of layout-test-results from ews114 for mac-yosemite The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews114 Port: mac-yosemite Platform: Mac OS X 10.10.5
Gavin Barraclough
Comment 8 2016-02-16 15:24:12 PST
Chris Dumez
Comment 9 2016-02-16 15:35:36 PST
Comment on attachment 271494 [details] Fix View in context: https://bugs.webkit.org/attachment.cgi?id=271494&action=review > Source/JavaScriptCore/runtime/JSObject.cpp:-2555 > - // JSDOMWindow::getOwnPropertySlot() may return attributes from the prototype chain but getOwnPropertyDescriptor() Nice that we can get rid of this hack. > Source/WebCore/bindings/js/JSDOMWindowCustom.cpp:199 > + if (proto.isObject() && asObject(proto)->getPropertySlot(exec, propertyName, prototypeSlot)) Why don't we use asObject(proto)->hasProperty(exec, propertyName) ? This is what our generated bindings are doing and it avoids having to construct a slot.
Chris Dumez
Comment 10 2016-02-16 15:37:46 PST
Comment on attachment 271494 [details] Fix View in context: https://bugs.webkit.org/attachment.cgi?id=271494&action=review > Source/WebCore/bindings/js/JSDOMWindowCustom.cpp:195 > // FIXME: If the property is present on the prototype we should 'return false;', not We should also drop this FIXME :o)
Chris Dumez
Comment 11 2016-02-16 15:39:29 PST
Comment on attachment 271494 [details] Fix You also apparently need to check imported/w3c/web-platform-tests/html/dom/interfaces.html as it is failing on ews.
Gavin Barraclough
Comment 12 2016-02-16 17:07:43 PST
Created attachment 271511 [details] Updated patch
Chris Dumez
Comment 13 2016-02-16 17:10:25 PST
Comment on attachment 271511 [details] Updated patch Nice, r=me!
Gavin Barraclough
Comment 14 2016-02-16 17:38:00 PST
Transmitting file data ........ Committed revision 196676.
Simon Fraser (smfr)
Comment 15 2016-02-16 17:42:54 PST
What is the photo chain?
Chris Dumez
Comment 16 2016-02-17 22:25:55 PST
Comment on attachment 271511 [details] Updated patch View in context: https://bugs.webkit.org/attachment.cgi?id=271511&action=review > Source/JavaScriptCore/runtime/JSObject.cpp:-2555 > - // JSDOMWindow::getOwnPropertySlot() may return attributes from the prototype chain but getOwnPropertyDescriptor() Looks like this may have caused Bug 154378. As it turns out, JSDOMWindow::getOwnPropertySlot() is not the only one returning attributes from the prototype chain, so does DebuggerScope::getOwnPropertySlot() :/
Note You need to log in before you can comment on or make changes to this bug.