Index: Source/bindings/scripts/CodeGeneratorV8.pm |
diff --git a/Source/bindings/scripts/CodeGeneratorV8.pm b/Source/bindings/scripts/CodeGeneratorV8.pm |
index 6dd476178a94a259375aba4d6bbd5d5f78ebfa03..91b7b2cdbb36834de7eabd3ff4604c6a5ae128e1 100644 |
--- a/Source/bindings/scripts/CodeGeneratorV8.pm |
+++ b/Source/bindings/scripts/CodeGeneratorV8.pm |
@@ -923,6 +923,12 @@ inline v8::Handle<v8::Object> wrap(${nativeType}* impl, v8::Handle<v8::Object> c |
{ |
ASSERT(impl); |
ASSERT(DOMDataStore::getWrapper(impl, isolate).IsEmpty()); |
+ if (ScriptWrappable::wrapperCanBeStoredInObject(impl)) { |
+ const WrapperTypeInfo* actualInfo = ScriptWrappable::getTypeInfoFromObject(impl); |
+ // Might be a XXXConstructor::info instead of an XXX::info. These will both have |
+ // the same object de-ref functions, though, so use that as the basis of the check. |
+ RELEASE_ASSERT(actualInfo->derefObjectFunction == ${v8InterfaceName}::info.derefObjectFunction); |
+ } |
return ${returningCreatedWrapperOpening}$createWrapperCall(impl, creationContext, isolate)${returningCreatedWrapperClosing}; |
} |
END |