Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(332)

Unified Diff: Source/bindings/scripts/CodeGeneratorV8.pm

Issue 13828008: Second part of moving V8 Binding Integrity off of vtables. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/bindings/v8/DOMDataStore.h » ('j') | Source/bindings/v8/ScriptWrappable.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/scripts/CodeGeneratorV8.pm
diff --git a/Source/bindings/scripts/CodeGeneratorV8.pm b/Source/bindings/scripts/CodeGeneratorV8.pm
index 378e8a3ab9ce27d8238117219a5f9a698645fbd5..082878712fb233c02e66e8f7213cf05b5de62bae 100644
--- a/Source/bindings/scripts/CodeGeneratorV8.pm
+++ b/Source/bindings/scripts/CodeGeneratorV8.pm
@@ -2854,14 +2854,19 @@ inline void checkTypeOrDieTrying(${nativeType}* object)
END
-
my $parentClassInfo = $parentClass ? "&${parentClass}::info" : "0";
-
my $WrapperTypePrototype = $interface->isException ? "WrapperTypeErrorPrototype" : "WrapperTypeObjectPrototype";
-
push(@implContentInternals, "WrapperTypeInfo ${v8InterfaceName}::info = { ${v8InterfaceName}::GetTemplate, ${v8InterfaceName}::derefObject, $toActiveDOMObject, $toEventTarget, $rootForGC, ${v8InterfaceName}::installPerContextPrototypeProperties, $parentClassInfo, $WrapperTypePrototype };\n\n");
- push(@implContentInternals, "namespace ${interfaceName}V8Internal {\n\n");
+ push(@implContentInternals, <<END) if !$codeGenerator->IsSVGTypeNeedingTearOff($interfaceName);
+void scriptwrappable_init(${interfaceName}* object)
abarth-chromium 2013/04/11 22:59:33 scriptwrappable_init <-- That's an odd name.
+{
+ if (ScriptWrappable::wrapperCanBeStoredInObject(object))
+ ScriptWrappable::setTypeInfoInObject(object, &${v8InterfaceName}::info);
+}
+END
+
+ push(@implContentInternals, "namespace ${interfaceName}V8Internal {\n\n");
push(@implContentInternals, "template <typename T> void V8_USE(T) { }\n\n");
my $hasConstructors = 0;
« no previous file with comments | « no previous file | Source/bindings/v8/DOMDataStore.h » ('j') | Source/bindings/v8/ScriptWrappable.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698