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

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: Fix comments. 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') | no next file with comments »
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 1bbf3af35708283cbfc60e91d2d742b667354555..60ba99d370be03a513b332f1a2bceb503f9e4b5e 100644
--- a/Source/bindings/scripts/CodeGeneratorV8.pm
+++ b/Source/bindings/scripts/CodeGeneratorV8.pm
@@ -3005,16 +3005,39 @@ inline void checkTypeOrDieTrying(${nativeType}* object)
END
-
my $parentClassInfo = $parentClass ? "&${parentClass}::info" : "0";
-
my $WrapperTypePrototype = $interface->isException ? "WrapperTypeErrorPrototype" : "WrapperTypeObjectPrototype";
+ if (!$codeGenerator->IsSVGTypeNeedingTearOff($interfaceName)) {
+ push(@implContentInternals, <<END);
+#if defined(OS_WIN)
+// In ScriptWrappable, the use of extern function prototypes inside templated static methods has an issue on windows.
+// These prototypes do not pick up the surrounding namespace, so drop out of WebCore as a workaround.
+} // namespace WebCore
+using WebCore::ScriptWrappable;
+using WebCore::${v8InterfaceName};
+END
+ push(@implContentInternals, <<END) if (GetNamespaceForInterface($interface) eq "WebCore");
+using WebCore::${interfaceName};
+END
+ push(@implContentInternals, <<END);
+#endif
+void initializeScriptWrappableForInterface(${interfaceName}* object)
+{
+ if (ScriptWrappable::wrapperCanBeStoredInObject(object))
+ ScriptWrappable::setTypeInfoInObject(object, &${v8InterfaceName}::info);
+}
+#if defined(OS_WIN)
+namespace WebCore {
+#endif
+END
+ }
+
my $code = "WrapperTypeInfo ${v8InterfaceName}::info = { ${v8InterfaceName}::GetTemplate, ${v8InterfaceName}::derefObject, $toActiveDOMObject, $toEventTarget, ";
$code .= "$rootForGC, ${v8InterfaceName}::installPerContextPrototypeProperties, $parentClassInfo, $WrapperTypePrototype };\n\n";
AddToImplContentInternals($code);
- AddToImplContentInternals("namespace ${interfaceName}V8Internal {\n\n");
+ AddToImplContentInternals("namespace ${interfaceName}V8Internal {\n\n");
AddToImplContentInternals("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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698