Changeset 196676 in webkit
- Timestamp:
- Feb 16, 2016 5:37:56 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r196675 r196676 1 2016-02-16 Gavin Barraclough <barraclough@apple.com> 2 3 JSDOMWindow::getOwnPropertySlot should not search photo chain 4 https://bugs.webkit.org/show_bug.cgi?id=154102 5 6 Reviewed by Chris Dumez. 7 8 Should only return *own* properties. 9 10 * fast/dom/Window/es52-globals-expected.txt: 11 * http/tests/security/window-named-valueOf-expected.txt: 12 * imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt: 13 - update test results. 14 1 15 2016-02-16 Keith Miller <keith_miller@apple.com> 2 16 -
trunk/LayoutTests/fast/dom/Window/es52-globals-expected.txt
r121376 r196676 1 1 PASS window.hasOwnProperty("Element") is true 2 2 PASS window.hasOwnProperty("x") is true 3 FAIL window.hasOwnProperty("y") should be false. Was true. 3 PASS window.hasOwnProperty("y") is false 4 4 PASS window.hasOwnProperty("f") is true 5 5 PASS window.hasOwnProperty("div") is true -
trunk/LayoutTests/http/tests/security/window-named-valueOf-expected.txt
r178527 r196676 1 CONSOLE MESSAGE: line 1: Blocked a frame with origin "null" from accessing a frame with origin "http://localhost:8080". The frame requesting access has a protocol of "data", the frame being accessed has a protocol of "http". Protocols must match. 2 1 3 CONSOLE MESSAGE: line 1: Blocked a frame with origin "null" from accessing a frame with origin "http://localhost:8080". The frame requesting access has a protocol of "data", the frame being accessed has a protocol of "http". Protocols must match. 2 4 -
trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt
r196673 r196676 4085 4085 PASS Window interface: window must inherit property "sessionStorage" with the proper type (123) 4086 4086 PASS Window interface: window must inherit property "localStorage" with the proper type (124) 4087 FAIL EventTarget interface: window must inherit property "addEventListener" with the proper type (0) assert_inherits: property "addEventListener" found on object expected in prototype chain 4088 FAIL EventTarget interface: calling addEventListener(DOMString,EventListener,boolean) on window with too few arguments must throw TypeError assert_inherits: property "addEventListener" found on object expected in prototype chain 4089 FAIL EventTarget interface: window must inherit property "removeEventListener" with the proper type (1) assert_inherits: property "removeEventListener" found on object expected in prototype chain 4090 FAIL EventTarget interface: calling removeEventListener(DOMString,EventListener,boolean) on window with too few arguments must throw TypeError assert_inherits: property "removeEventListener" found on object expected in prototype chain 4091 FAIL EventTarget interface: window must inherit property "dispatchEvent" with the proper type (2) assert_inherits: property "dispatchEvent" found on object expected in prototype chain 4092 FAIL EventTarget interface: calling dispatchEvent(Event) on window with too few arguments must throw TypeError assert_inherits: property "dispatchEvent" found on object expected in prototype chain 4087 PASS EventTarget interface: window must inherit property "addEventListener" with the proper type (0) 4088 FAIL EventTarget interface: calling addEventListener(DOMString,EventListener,boolean) on window with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () { 4089 [native code] 4090 }" did not throw 4091 PASS EventTarget interface: window must inherit property "removeEventListener" with the proper type (1) 4092 FAIL EventTarget interface: calling removeEventListener(DOMString,EventListener,boolean) on window with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () { 4093 [native code] 4094 }" did not throw 4095 PASS EventTarget interface: window must inherit property "dispatchEvent" with the proper type (2) 4096 PASS EventTarget interface: calling dispatchEvent(Event) on window with too few arguments must throw TypeError 4093 4097 PASS BarProp interface: existence and properties of interface object 4094 4098 PASS BarProp interface object length -
trunk/Source/JavaScriptCore/ChangeLog
r196675 r196676 1 2016-02-16 Gavin Barraclough <barraclough@apple.com> 2 3 JSDOMWindow::getOwnPropertySlot should not search photo chain 4 https://bugs.webkit.org/show_bug.cgi?id=154102 5 6 Reviewed by Chris Dumez. 7 8 Should only return *own* properties. 9 10 * runtime/JSObject.cpp: 11 (JSC::JSObject::getOwnPropertyDescriptor): 12 - remove hack/special-case for DOMWindow; we no longer need this. 13 1 14 2016-02-16 Keith Miller <keith_miller@apple.com> 2 15 -
trunk/Source/JavaScriptCore/runtime/JSObject.cpp
r196648 r196676 2553 2553 return false; 2554 2554 2555 // JSDOMWindow::getOwnPropertySlot() may return attributes from the prototype chain but getOwnPropertyDescriptor()2556 // should only work for 'own' properties so we exit early if we detect that the property is not an own property.2557 if (slot.slotBase() != this && slot.slotBase()) {2558 auto* proxy = jsDynamicCast<JSProxy*>(this);2559 // In the case of DOMWindow, |this| may be a JSDOMWindowShell so we also need to check the shell's target Window.2560 if (!proxy || proxy->target() != slot.slotBase())2561 return false;2562 }2563 2564 2555 if (slot.isAccessor()) 2565 2556 descriptor.setAccessorDescriptor(slot.getterSetter(), slot.attributes()); -
trunk/Source/WebCore/ChangeLog
r196674 r196676 1 2016-02-16 Gavin Barraclough <barraclough@apple.com> 2 3 JSDOMWindow::getOwnPropertySlot should not search photo chain 4 https://bugs.webkit.org/show_bug.cgi?id=154102 5 6 Reviewed by Chris Dumez. 7 8 Should only return *own* properties. 9 10 * bindings/js/JSDOMWindowCustom.cpp: 11 (WebCore::jsDOMWindowGetOwnPropertySlotNamedItemGetter): 12 1 13 2016-02-16 Alex Christensen <achristensen@webkit.org> 2 14 -
trunk/Source/WebCore/bindings/js/JSDOMWindowCustom.cpp
r196648 r196676 193 193 static bool jsDOMWindowGetOwnPropertySlotNamedItemGetter(JSDOMWindow* thisObject, Frame& frame, ExecState* exec, PropertyName propertyName, PropertySlot& slot) 194 194 { 195 // FIXME: If the property is present on the prototype we should 'return false;', not196 // return the property. This is supposed to be an 'own' access.197 195 JSValue proto = thisObject->prototype(); 198 if (proto.isObject() && asObject(proto)-> getPropertySlot(exec, propertyName, slot))199 return true;196 if (proto.isObject() && asObject(proto)->hasProperty(exec, propertyName)) 197 return false; 200 198 201 199 // Check for child frames by name before built-in properties to match Mozilla. This does
Note: See TracChangeset
for help on using the changeset viewer.