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

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

Issue 165443003: Pass implementation object to supplemental classes by reference (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 10 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/tests/results/V8TestInterface.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/scripts/code_generator_v8.pm
diff --git a/Source/bindings/scripts/code_generator_v8.pm b/Source/bindings/scripts/code_generator_v8.pm
index 825b6c65fd4c68c0044d9df07d038594f7e5d923..e04ac99dfb8396ab21b9e531f40d7e12f3e5bcce 100644
--- a/Source/bindings/scripts/code_generator_v8.pm
+++ b/Source/bindings/scripts/code_generator_v8.pm
@@ -1609,7 +1609,10 @@ END
my $implementedBy = $attribute->extendedAttributes->{"ImplementedBy"};
my $implementedByImplName = GetImplNameFromImplementedBy($implementedBy);
AddToImplIncludes(HeaderFilesForInterface($implementedBy, $implementedByImplName));
- unshift(@arguments, "imp") if !$attribute->isStatic;
+ if (!$attribute->isStatic) {
+ $code .= " ASSERT(imp);\n";
+ unshift(@arguments, "*imp");
+ }
$functionName = "${implementedByImplName}::${functionName}";
} elsif ($attribute->isStatic) {
$functionName = "${implClassName}::${functionName}";
@@ -1766,7 +1769,8 @@ END
if ($implementedBy) {
my $implementedByImplName = GetImplNameFromImplementedBy($implementedBy);
$functionName = "${implementedByImplName}::${functionName}";
- push(@arguments, "imp");
+ $code .= " ASSERT(imp);\n";
+ push(@arguments, "*imp");
} else {
$functionName = "imp->${functionName}";
}
@@ -2117,7 +2121,8 @@ END
my @arguments;
if ($implementedBy) {
$attrImplName = "${implementedByImplName}::${attrImplName}";
- push(@arguments, "imp");
+ $code .= " ASSERT(imp);\n";
+ push(@arguments, "*imp");
} else {
$attrImplName = "imp->${attrImplName}";
}
@@ -2125,8 +2130,9 @@ END
}
my ($functionName, @arguments) = SetterExpression($interfaceName, $attribute);
if ($implementedBy) {
+ $code .= " ASSERT(imp);\n";
$functionName = "${implementedByImplName}::${functionName}";
- push(@arguments, "imp");
+ push(@arguments, "*imp");
} else {
$functionName = "imp->${functionName}";
}
@@ -2145,7 +2151,10 @@ END
my $implementedBy = $attribute->extendedAttributes->{"ImplementedBy"};
my $implementedByImplName = GetImplNameFromImplementedBy($implementedBy);
AddToImplIncludes(HeaderFilesForInterface($implementedBy, $implementedByImplName));
- unshift(@arguments, "imp") if !$attribute->isStatic;
+ if (!$attribute->isStatic) {
+ $code .= " ASSERT(imp);\n";
+ unshift(@arguments, "*imp");
+ }
$functionName = "${implementedByImplName}::${functionName}";
} elsif ($attribute->isStatic) {
$functionName = "${implClassName}::${functionName}";
@@ -5284,7 +5293,10 @@ sub GenerateFunctionCallString
if ($implementedBy) {
my $implementedByImplName = GetImplNameFromImplementedBy($implementedBy);
AddToImplIncludes(HeaderFilesForInterface($implementedBy, $implementedByImplName));
- unshift(@arguments, "imp") if !$function->isStatic;
+ if (!$function->isStatic) {
+ $code .= " ASSERT(imp);\n";
+ unshift(@arguments, "*imp");
+ }
$functionName = "${implementedByImplName}::${name}";
} elsif ($function->isStatic) {
$functionName = "${implClassName}::${name}";
« no previous file with comments | « no previous file | Source/bindings/tests/results/V8TestInterface.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698