Changeset 196723 in webkit
- Timestamp:
- Feb 17, 2016 2:59:59 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r196719 r196723 1 2016-02-17 Chris Dumez <cdumez@apple.com> 2 3 SES selftest page crashes on nightly r196694 4 https://bugs.webkit.org/show_bug.cgi?id=154350 5 <rdar://problem/24704334> 6 7 Reviewed by Mark Lam. 8 9 Add test coverage for the crash which happens when shadowing window.length 10 with a value after the window property and then calling 11 Object.getOwnPropertyDescriptor(window, "length"). 12 13 * js/window-length-getOwnPropertyDescriptor-crash-expected.txt: Added. 14 * js/window-length-getOwnPropertyDescriptor-crash.html: Added. 15 1 16 2016-02-17 Simon Fraser <simon.fraser@apple.com> 2 17 -
trunk/Source/JavaScriptCore/ChangeLog
r196722 r196723 1 2016-02-17 Chris Dumez <cdumez@apple.com> 2 3 SES selftest page crashes on nightly r196694 4 https://bugs.webkit.org/show_bug.cgi?id=154350 5 <rdar://problem/24704334> 6 7 Reviewed by Mark Lam. 8 9 SES selftest page crashes after r196001 / r196145 when calling 10 Object.getOwnPropertyDescriptor(window, "length") after the window 11 has been reified and "length" has been shadowed by a value property. 12 13 It was crashing in JSObject::getOwnPropertyDescriptor() because 14 we are getting a slot that has attribute "CustomAccessor" but 15 the property is not a CustomGetterSetter. In this case, since 16 window.length is [Replaceable] and has been set to a numeric value, 17 it makes that the property is not a CustomGetterSetter. However, 18 the "CustomAccessor" attribute should have been dropped from the 19 slot when window.length was shadowed. Therefore, this code path 20 should not be exercised at all when calling 21 getOwnPropertyDescriptor(). 22 23 The issue was that putDirectInternal() was updating the slot 24 attributes only if the "Accessor" flag has changed, but not 25 the "customAccessor" flag. This patch fixes the issue. 26 27 * runtime/JSObject.h: 28 (JSC::JSObject::putDirectInternal): 29 1 30 2016-02-17 Saam barati <sbarati@apple.com> 2 31 -
trunk/Source/JavaScriptCore/runtime/JSObject.h
r196722 r196723 1229 1229 slot.setExistingProperty(this, offset); 1230 1230 1231 if ((attributes & Accessor) != (currentAttributes & Accessor) ) {1231 if ((attributes & Accessor) != (currentAttributes & Accessor) || (attributes & CustomAccessor) != (currentAttributes & CustomAccessor)) { 1232 1232 ASSERT(!(attributes & ReadOnly)); 1233 1233 setStructure(vm, Structure::attributeChangeTransition(vm, structure, propertyName, attributes));
Note: See TracChangeset
for help on using the changeset viewer.