From 9daf1655d7e4eaaa6ed5f44055a4b4fd399fd25c Mon Sep 17 00:00:00 2001 From: Konstantin Tokarev Date: Wed, 28 Sep 2016 16:39:37 +0300 Subject: Imported WebKit commit eb954cdcf58f9b915b2fcb6f8e4cb3a60650a4f3 Change-Id: I8dda875c38075d43b76fe3a21acb0ffa102bb82d Reviewed-by: Konstantin Tokarev --- Source/JavaScriptCore/runtime/JSObject.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'Source/JavaScriptCore/runtime/JSObject.cpp') 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 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))) { -- cgit v1.2.1