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

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

Issue 14670022: Make sure the main header is not included twice in the generated implementation (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 7 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/V8TestObj.cpp » ('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 3d903081b7da5b91443bab9bc566e5101a03d707..762f421b0548c69c526e875629f44c87865fcea7 100644
--- a/Source/bindings/scripts/CodeGeneratorV8.pm
+++ b/Source/bindings/scripts/CodeGeneratorV8.pm
@@ -4036,14 +4036,12 @@ sub GenerateHeaderContentHeader
sub GenerateImplementationContentHeader
{
my $interface = shift;
- my $v8InterfaceName = "V8" . $interface->name;
my $conditionalString = GenerateConditionalString($interface);
my @implContentHeader = split("\r", $headerTemplate);
push(@implContentHeader, "\n#include \"config.h\"\n");
push(@implContentHeader, "#if ${conditionalString}\n") if $conditionalString;
- push(@implContentHeader, "#include \"${v8InterfaceName}.h\"\n\n");
return @implContentHeader;
}
@@ -5099,9 +5097,11 @@ sub WriteData
UpdateFile($implFileName, $implementation{root}->toString());
} else {
my $contents = join "", @implContentHeader;
+ my $mainInclude = "\"V8$name.h\"";
+ $contents .= "#include $mainInclude\n\n";
foreach my $include (sort @includes) {
- $contents .= "#include $include\n";
+ $contents .= "#include $include\n" unless $include eq $mainInclude;
}
foreach my $condition (sort keys %implIncludeConditions) {
$contents .= "\n#if " . GenerateConditionalStringFromAttributeValue($condition) . "\n";
« no previous file with comments | « no previous file | Source/bindings/tests/results/V8TestObj.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698