Changeset 194399 in webkit
- Timestamp:
- Dec 23, 2015, 3:31:44 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/storage/domstorage/localstorage/delete-defineproperty-removal-expected.txt (added)
-
LayoutTests/storage/domstorage/localstorage/delete-defineproperty-removal.html (added)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/bindings/js/JSStorageCustom.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r194397 r194399 1 2015-12-23 Pranjal Jumde <pjumde@apple.com> 2 3 Test to check for stack recursion when indexed propertyNames defined using Object.defineProperty are deleted. 4 https://bugs.webkit.org/show_bug.cgi?id=149179 5 <rdar://problem/22708019>. 6 7 Reviewed by Filip Pizlo. 8 9 * storage/domstorage/localstorage/delete-defineproperty-removal-expected.txt: Added. 10 * storage/domstorage/localstorage/delete-defineproperty-removal.html: Added. 11 1 12 2015-12-23 Eric Carlson <eric.carlson@apple.com> 2 13 -
trunk/Source/WebCore/ChangeLog
r194397 r194399 1 2015-12-23 Pranjal Jumde <pjumde@apple.com> 2 3 Avoids stack recursion when indexed propertyNames defined using Object.defineProperty are deleted. 4 https://bugs.webkit.org/show_bug.cgi?id=149179 5 <rdar://problem/22708019>. 6 7 Reviewed by Filip Pizlo. 8 9 * runtime/JSObject.cpp: 10 (JSStorage::deletePropertyByIndex was invoking Base::deleteProperty for indexed propertyNames instead of Base::deletePropertyByIndex leading to a stack recursion) 11 1 12 2015-12-23 Eric Carlson <eric.carlson@apple.com> 2 13 -
trunk/Source/WebCore/bindings/js/JSStorageCustom.cpp
r191887 r194399 59 59 // the native property slots manually. 60 60 PropertySlot slot(thisObject); 61 if (getStaticValueSlot<JSStorage, Base>(exec, *s_info.staticPropHashTable, thisObject, propertyName, slot)) 61 if (getStaticValueSlot<JSStorage, Base>(exec, *s_info.staticPropHashTable, thisObject, propertyName, slot)) { 62 if (Optional<uint32_t> index = parseIndex(propertyName)) 63 return Base::deletePropertyByIndex(thisObject, exec, index.value()); 62 64 return Base::deleteProperty(thisObject, exec, propertyName); 63 65 } 64 66 JSValue prototype = thisObject->prototype(); 65 67 if (prototype.isObject() && asObject(prototype)->getPropertySlot(exec, propertyName, slot)) … … 77 79 bool JSStorage::deletePropertyByIndex(JSCell* cell, ExecState* exec, unsigned propertyName) 78 80 { 81 JSStorage* thisObject = jsCast<JSStorage*>(cell); 82 PropertySlot slot(thisObject); 83 if (getStaticValueSlot<JSStorage, Base>(exec, *s_info.staticPropHashTable, thisObject, Identifier::from(exec, propertyName), slot)) 84 return Base::deletePropertyByIndex(thisObject, exec, propertyName); 79 85 return deleteProperty(cell, exec, Identifier::from(exec, propertyName)); 80 86 }
Note:
See TracChangeset
for help on using the changeset viewer.