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

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

Issue 171333003: Pass implementation object to supplemental classes by reference (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase 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
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 9eba7868b01b48f20f66ff62556ec204c65ef93c..e9b068366e9a8ad7aa4b62eb50bacb7639aa3f56 100644
--- a/Source/bindings/scripts/code_generator_v8.pm
+++ b/Source/bindings/scripts/code_generator_v8.pm
@@ -1610,7 +1610,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}";
@@ -1767,7 +1770,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}";
}
@@ -2118,7 +2122,8 @@ END
my @arguments;
if ($implementedBy) {
$attrImplName = "${implementedByImplName}::${attrImplName}";
- push(@arguments, "imp");
+ $code .= " ASSERT(imp);\n";
+ push(@arguments, "*imp");
} else {
$attrImplName = "imp->${attrImplName}";
}
@@ -2126,8 +2131,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}";
}
@@ -2146,7 +2152,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}";
@@ -5291,7 +5300,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}";

Powered by Google App Engine
This is Rietveld 408576698