diff --git a/Source/JavaScriptCore/runtime/ProxyObject.cpp b/Source/JavaScriptCore/runtime/ProxyObject.cpp index 2e656781c885..b73674598493 100644 --- a/Source/JavaScriptCore/runtime/ProxyObject.cpp +++ b/Source/JavaScriptCore/runtime/ProxyObject.cpp @@ -1245,8 +1245,11 @@ JSValue ProxyObject::performGetPrototype(JSGlobalObject* globalObject) RETURN_IF_EXCEPTION(scope, { }); JSObject* target = this->target(); - if (getPrototypeOfMethod.isUndefined()) - RELEASE_AND_RETURN(scope, target->getPrototype(globalObject)); + if (getPrototypeOfMethod.isUndefined()) { + JSValue result = target->getPrototype(globalObject); + RETURN_IF_EXCEPTION(scope, { }); + return result; + } MarkedArgumentBuffer arguments; arguments.append(target);