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

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: Invert meaning of flag to avoid branches in hot path. 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 dbb1c56a26978f9f8378e0c343b7f91931113a41..a5cb691ed0b1ca12ecc08be56ce7b673f854dba0 100644
--- a/Source/bindings/scripts/CodeGeneratorV8.pm
+++ b/Source/bindings/scripts/CodeGeneratorV8.pm
@@ -2850,14 +2850,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 initializeScriptWrappableForInterface(${interfaceName}* object)
+{
+ 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