Modified: trunk/Source/_javascript_Core/runtime/JSFunction.cpp (209031 => 209032)
--- trunk/Source/_javascript_Core/runtime/JSFunction.cpp 2016-11-28 23:30:59 UTC (rev 209031)
+++ trunk/Source/_javascript_Core/runtime/JSFunction.cpp 2016-11-28 23:38:17 UTC (rev 209032)
@@ -425,13 +425,16 @@
JSFunction* thisObject = jsCast<JSFunction*>(cell);
- if (UNLIKELY(isThisValueAltered(slot, thisObject)))
+ if (UNLIKELY(isThisValueAltered(slot, thisObject))) {
+ scope.release();
return ordinarySetSlow(exec, thisObject, propertyName, value, slot.thisValue(), slot.isStrictMode());
+ }
if (thisObject->isHostOrBuiltinFunction()) {
LazyPropertyType propType = thisObject->reifyBoundNameIfNeeded(vm, exec, propertyName);
if (propType == LazyPropertyType::IsLazyProperty)
slot.disableCaching();
+ scope.release();
return Base::put(thisObject, exec, propertyName, value, slot);
}
@@ -454,6 +457,7 @@
// FIXME: Investigate if the `hasProperty()` call is even needed, as in the `!hasCallerAndArgumentsProperties()` case,
// these properties are not lazy and should not need to be reified. (https://bugs.webkit.org/show_bug.cgi?id=163579)
bool okay = thisObject->hasProperty(exec, propertyName);
+ RETURN_IF_EXCEPTION(scope, false);
ASSERT_UNUSED(okay, okay);
scope.release();
return Base::put(thisObject, exec, propertyName, value, slot);
@@ -497,6 +501,7 @@
JSFunction* thisObject = jsCast<JSFunction*>(object);
if (thisObject->isHostOrBuiltinFunction()) {
thisObject->reifyBoundNameIfNeeded(vm, exec, propertyName);
+ scope.release();
return Base::defineOwnProperty(object, exec, propertyName, descriptor, throwException);
}
@@ -507,6 +512,7 @@
thisObject->methodTable(vm)->getOwnPropertySlot(thisObject, exec, propertyName, slot);
if (thisObject->m_rareData)
thisObject->m_rareData->clear("Store to prototype property of a function");
+ scope.release();
return Base::defineOwnProperty(object, exec, propertyName, descriptor, throwException);
}
@@ -515,11 +521,13 @@
if (!thisObject->jsExecutable()->hasCallerAndArgumentsProperties()) {
if (thisObject->jsExecutable()->isClass()) {
thisObject->reifyLazyPropertyIfNeeded(vm, exec, propertyName);
+ scope.release();
return Base::defineOwnProperty(object, exec, propertyName, descriptor, throwException);
}
PropertySlot slot(thisObject, PropertySlot::InternalMethodType::VMInquiry);
if (!Base::getOwnPropertySlot(thisObject, exec, propertyName, slot))
thisObject->putDirectAccessor(exec, propertyName, thisObject->globalObject(vm)->throwTypeErrorArgumentsCalleeAndCallerGetterSetter(), DontDelete | DontEnum | Accessor);
+ scope.release();
return Base::defineOwnProperty(object, exec, propertyName, descriptor, throwException);
}
valueCheck = !descriptor.value() || sameValue(exec, descriptor.value(), retrieveArguments(exec, thisObject));
@@ -527,16 +535,19 @@
if (!thisObject->jsExecutable()->hasCallerAndArgumentsProperties()) {
if (thisObject->jsExecutable()->isClass()) {
thisObject->reifyLazyPropertyIfNeeded(vm, exec, propertyName);
+ scope.release();
return Base::defineOwnProperty(object, exec, propertyName, descriptor, throwException);
}
PropertySlot slot(thisObject, PropertySlot::InternalMethodType::VMInquiry);
if (!Base::getOwnPropertySlot(thisObject, exec, propertyName, slot))
thisObject->putDirectAccessor(exec, propertyName, thisObject->globalObject(vm)->throwTypeErrorArgumentsCalleeAndCallerGetterSetter(), DontDelete | DontEnum | Accessor);
+ scope.release();
return Base::defineOwnProperty(object, exec, propertyName, descriptor, throwException);
}
valueCheck = !descriptor.value() || sameValue(exec, descriptor.value(), retrieveCallerFunction(exec, thisObject));
} else {
thisObject->reifyLazyPropertyIfNeeded(vm, exec, propertyName);
+ scope.release();
return Base::defineOwnProperty(object, exec, propertyName, descriptor, throwException);
}