Index: Source/bindings/core/v8/PrivateScriptRunner.cpp |
diff --git a/Source/bindings/core/v8/PrivateScriptRunner.cpp b/Source/bindings/core/v8/PrivateScriptRunner.cpp |
index 491578038954b98bb5ccf68ea57d0f01cf68c269..eb80fbffea257c20aaf0faafc8ed79cd51cb586a 100644 |
--- a/Source/bindings/core/v8/PrivateScriptRunner.cpp |
+++ b/Source/bindings/core/v8/PrivateScriptRunner.cpp |
@@ -98,6 +98,11 @@ static void initializeHolderIfNeeded(ScriptState* scriptState, v8::Handle<v8::Ob |
RELEASE_ASSERT_NOT_REACHED(); |
} |
} |
+ |
+ if (classObject->GetPrototype() != holderObject->GetPrototype()) |
+ classObject->SetPrototype(holderObject->GetPrototype()); |
+ holderObject->SetPrototype(classObject); |
+ |
isInitialized = v8Boolean(true, isolate); |
V8HiddenValue::setHiddenValue(isolate, holderObject, V8HiddenValue::privateScriptObjectIsInitialized(isolate), isInitialized); |
} |