Changeset 196760 in webkit
- Timestamp:
- Feb 18, 2016 9:19:33 AM (8 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r196759 r196760 1 2016-02-18 Chris Dumez <cdumez@apple.com> 2 3 Crash on SES selftest page when loading the page while WebInspector is open 4 https://bugs.webkit.org/show_bug.cgi?id=154378 5 <rdar://problem/24713422> 6 7 Reviewed by Mark Lam. 8 9 Do a partial revert of r196676 so that JSObject::getOwnPropertyDescriptor() 10 returns early again if it detects that getOwnPropertySlot() returns a 11 non-own property. This check was removed in r196676 because we assumed that 12 only JSDOMWindow::getOwnPropertySlot() could return non-own properties. 13 However, as it turns out, DebuggerScope::getOwnPropertySlot() does so as 14 well. 15 16 Not having the check would lead to crashes when using the debugger because 17 we would get a slot with the CustomAccessor attribute but getDirect() would 18 then fail to return the property (because it is not an own property). We 19 would then cast the value returned by getDirect() to a CustomGetterSetter* 20 and dereference it. 21 22 * runtime/JSObject.cpp: 23 (JSC::JSObject::getOwnPropertyDescriptor): 24 1 25 2016-02-18 Filip Pizlo <fpizlo@apple.com> 2 26 -
trunk/Source/JavaScriptCore/runtime/JSObject.cpp
r196722 r196760 2557 2557 return false; 2558 2558 2559 // DebuggerScope::getOwnPropertySlot() (and possibly others) may return attributes from the prototype chain 2560 // but getOwnPropertyDescriptor() should only work for 'own' properties so we exit early if we detect that 2561 // the property is not an own property. 2562 if (slot.slotBase() != this && slot.slotBase()) { 2563 auto* proxy = jsDynamicCast<JSProxy*>(this); 2564 if (!proxy || proxy->target() != slot.slotBase()) 2565 return false; 2566 } 2567 2559 2568 if (slot.isAccessor()) 2560 2569 descriptor.setAccessorDescriptor(slot.getterSetter(), slot.attributes());
Note: See TracChangeset
for help on using the changeset viewer.