summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'Source/JavaScriptCore/runtime')
-rw-r--r--Source/JavaScriptCore/runtime/ArrayPrototype.cpp4
-rw-r--r--Source/JavaScriptCore/runtime/CommonIdentifiers.h29
-rw-r--r--Source/JavaScriptCore/runtime/JSObject.cpp9
3 files changed, 38 insertions, 4 deletions
diff --git a/Source/JavaScriptCore/runtime/ArrayPrototype.cpp b/Source/JavaScriptCore/runtime/ArrayPrototype.cpp
index ae1a6c28a..750a39418 100644
--- a/Source/JavaScriptCore/runtime/ArrayPrototype.cpp
+++ b/Source/JavaScriptCore/runtime/ArrayPrototype.cpp
@@ -832,7 +832,7 @@ EncodedJSValue JSC_HOST_CALL arrayProtoFuncSlice(ExecState* exec)
if (UNLIKELY(speciesResult.first == SpeciesConstructResult::Exception))
return JSValue::encode(jsUndefined());
- if (LIKELY(speciesResult.first == SpeciesConstructResult::FastPath && isJSArray(thisObj))) {
+ if (LIKELY(speciesResult.first == SpeciesConstructResult::FastPath && isJSArray(thisObj) && length == getLength(exec, thisObj))) {
if (JSArray* result = asArray(thisObj)->fastSlice(*exec, begin, end - begin))
return JSValue::encode(result);
}
@@ -899,7 +899,7 @@ EncodedJSValue JSC_HOST_CALL arrayProtoFuncSplice(ExecState* exec)
return JSValue::encode(jsUndefined());
JSObject* result = nullptr;
- if (speciesResult.first == SpeciesConstructResult::FastPath && isJSArray(thisObj))
+ if (speciesResult.first == SpeciesConstructResult::FastPath && isJSArray(thisObj) && length == getLength(exec, thisObj))
result = asArray(thisObj)->fastSlice(*exec, begin, deleteCount);
if (!result) {
diff --git a/Source/JavaScriptCore/runtime/CommonIdentifiers.h b/Source/JavaScriptCore/runtime/CommonIdentifiers.h
index 2ca665fc3..5314f3111 100644
--- a/Source/JavaScriptCore/runtime/CommonIdentifiers.h
+++ b/Source/JavaScriptCore/runtime/CommonIdentifiers.h
@@ -28,18 +28,37 @@
// MarkedArgumentBuffer of property names, passed to a macro so we can do set them up various
// ways without repeating the list.
#define JSC_COMMON_IDENTIFIERS_EACH_PROPERTY_NAME(macro) \
+ macro(AnimationTimeline) \
macro(Array) \
macro(ArrayBuffer) \
macro(ArrayIterator) \
+ macro(Audio) \
macro(BYTES_PER_ELEMENT) \
macro(Boolean) \
macro(Collator) \
macro(Date) \
macro(DateTimeFormat) \
+ macro(DocumentTimeline) \
macro(Error) \
macro(EvalError) \
macro(Function) \
+ macro(Gamepad) \
+ macro(GamepadButton) \
+ macro(GamepadEvent) \
macro(GeneratorFunction) \
+ macro(HTMLAudioElement) \
+ macro(HTMLSlotElement) \
+ macro(IDBCursor) \
+ macro(IDBCursorWithValue) \
+ macro(IDBDatabase) \
+ macro(IDBFactory) \
+ macro(IDBIndex) \
+ macro(IDBKeyRange) \
+ macro(IDBObjectStore) \
+ macro(IDBOpenDBRequest) \
+ macro(IDBRequest) \
+ macro(IDBTransaction) \
+ macro(IDBVersionChangeEvent) \
macro(Infinity) \
macro(Intl) \
macro(JSON) \
@@ -59,6 +78,7 @@
macro(RegExp) \
macro(Set)\
macro(SetIterator)\
+ macro(ShadowRoot) \
macro(String) \
macro(Symbol) \
macro(SyntaxError) \
@@ -67,6 +87,7 @@
macro(UTC) \
macro(WeakMap)\
macro(WeakSet)\
+ macro(WebSocket) \
macro(__defineGetter__) \
macro(__defineSetter__) \
macro(__lookupGetter__) \
@@ -216,6 +237,14 @@
macro(valueOf) \
macro(values) \
macro(webkit) \
+ macro(webkitIDBCursor) \
+ macro(webkitIDBDatabase) \
+ macro(webkitIDBFactory) \
+ macro(webkitIDBIndex) \
+ macro(webkitIDBKeyRange) \
+ macro(webkitIDBObjectStore) \
+ macro(webkitIDBRequest) \
+ macro(webkitIDBTransaction) \
macro(webkitIndexedDB) \
macro(weekday) \
macro(window) \
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))) {