diff options
Diffstat (limited to 'Source/JavaScriptCore/runtime/JSObject.cpp')
-rw-r--r-- | Source/JavaScriptCore/runtime/JSObject.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Source/JavaScriptCore/runtime/JSObject.cpp b/Source/JavaScriptCore/runtime/JSObject.cpp index 730194f3a..3ac431777 100644 --- a/Source/JavaScriptCore/runtime/JSObject.cpp +++ b/Source/JavaScriptCore/runtime/JSObject.cpp @@ -1301,8 +1301,13 @@ bool JSObject::deleteProperty(JSCell* cell, ExecState* exec, PropertyName proper if (Optional<uint32_t> index = parseIndex(propertyName)) return thisObject->methodTable(vm)->deletePropertyByIndex(thisObject, exec, index.value()); - if (!thisObject->staticFunctionsReified()) - thisObject->reifyAllStaticProperties(exec); + if (!thisObject->staticFunctionsReified()) { + if (auto* entry = thisObject->findPropertyHashEntry(propertyName)) { + if (entry->attributes() & DontDelete) + return false; + thisObject->reifyAllStaticProperties(exec); + } + } unsigned attributes; if (isValidOffset(thisObject->structure(vm)->get(vm, propertyName, attributes))) { |