Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (209022 => 209023)
--- trunk/Source/_javascript_Core/ChangeLog 2016-11-28 22:35:39 UTC (rev 209022)
+++ trunk/Source/_javascript_Core/ChangeLog 2016-11-28 22:39:10 UTC (rev 209023)
@@ -1,5 +1,21 @@
2016-11-28 Mark Lam <[email protected]>
+ Fix exception scope verification failures in runtime/Weak* files.
+ https://bugs.webkit.org/show_bug.cgi?id=165096
+
+ Reviewed by Geoffrey Garen.
+
+ * runtime/WeakMapConstructor.cpp:
+ (JSC::constructWeakMap):
+ * runtime/WeakMapPrototype.cpp:
+ (JSC::protoFuncWeakMapSet):
+ * runtime/WeakSetConstructor.cpp:
+ (JSC::constructWeakSet):
+ * runtime/WeakSetPrototype.cpp:
+ (JSC::protoFuncWeakSetAdd):
+
+2016-11-28 Mark Lam <[email protected]>
+
Fix exception scope verification failures in runtime/String* files.
https://bugs.webkit.org/show_bug.cgi?id=165067
Modified: trunk/Source/_javascript_Core/runtime/WeakMapConstructor.cpp (209022 => 209023)
--- trunk/Source/_javascript_Core/runtime/WeakMapConstructor.cpp 2016-11-28 22:35:39 UTC (rev 209022)
+++ trunk/Source/_javascript_Core/runtime/WeakMapConstructor.cpp 2016-11-28 22:39:10 UTC (rev 209023)
@@ -65,7 +65,7 @@
if (iterable.isUndefinedOrNull())
return JSValue::encode(weakMap);
- JSValue adderFunction = weakMap->JSObject::get(exec, exec->propertyNames().set);
+ JSValue adderFunction = weakMap->JSObject::get(exec, vm.propertyNames->set);
RETURN_IF_EXCEPTION(scope, encodedJSValue());
CallData adderFunctionCallData;
@@ -73,6 +73,7 @@
if (adderFunctionCallType == CallType::None)
return JSValue::encode(throwTypeError(exec, scope));
+ scope.release();
forEachInIterable(exec, iterable, [&](VM& vm, ExecState* exec, JSValue nextItem) {
auto scope = DECLARE_THROW_SCOPE(vm);
if (!nextItem.isObject()) {
@@ -89,6 +90,7 @@
MarkedArgumentBuffer arguments;
arguments.append(key);
arguments.append(value);
+ scope.release();
call(exec, adderFunction, adderFunctionCallType, adderFunctionCallData, weakMap, arguments);
});
Modified: trunk/Source/_javascript_Core/runtime/WeakMapPrototype.cpp (209022 => 209023)
--- trunk/Source/_javascript_Core/runtime/WeakMapPrototype.cpp 2016-11-28 22:35:39 UTC (rev 209022)
+++ trunk/Source/_javascript_Core/runtime/WeakMapPrototype.cpp 2016-11-28 22:39:10 UTC (rev 209023)
@@ -105,6 +105,7 @@
auto scope = DECLARE_THROW_SCOPE(vm);
WeakMapData* map = getWeakMapData(callFrame, callFrame->thisValue());
+ ASSERT(!!scope.exception() == !map);
if (!map)
return JSValue::encode(jsUndefined());
JSValue key = callFrame->argument(0);
Modified: trunk/Source/_javascript_Core/runtime/WeakSetConstructor.cpp (209022 => 209023)
--- trunk/Source/_javascript_Core/runtime/WeakSetConstructor.cpp 2016-11-28 22:35:39 UTC (rev 209022)
+++ trunk/Source/_javascript_Core/runtime/WeakSetConstructor.cpp 2016-11-28 22:39:10 UTC (rev 209023)
@@ -65,7 +65,7 @@
if (iterable.isUndefinedOrNull())
return JSValue::encode(weakSet);
- JSValue adderFunction = weakSet->JSObject::get(exec, exec->propertyNames().add);
+ JSValue adderFunction = weakSet->JSObject::get(exec, vm.propertyNames->add);
RETURN_IF_EXCEPTION(scope, encodedJSValue());
CallData adderFunctionCallData;
@@ -73,6 +73,7 @@
if (adderFunctionCallType == CallType::None)
return JSValue::encode(throwTypeError(exec, scope));
+ scope.release();
forEachInIterable(exec, iterable, [&](VM&, ExecState* exec, JSValue nextValue) {
MarkedArgumentBuffer arguments;
arguments.append(nextValue);
Modified: trunk/Source/_javascript_Core/runtime/WeakSetPrototype.cpp (209022 => 209023)
--- trunk/Source/_javascript_Core/runtime/WeakSetPrototype.cpp 2016-11-28 22:35:39 UTC (rev 209022)
+++ trunk/Source/_javascript_Core/runtime/WeakSetPrototype.cpp 2016-11-28 22:39:10 UTC (rev 209023)
@@ -92,6 +92,7 @@
auto scope = DECLARE_THROW_SCOPE(vm);
WeakMapData* map = getWeakMapData(callFrame, callFrame->thisValue());
+ ASSERT(!!scope.exception() == !map);
if (!map)
return JSValue::encode(jsUndefined());
JSValue key = callFrame->argument(0);