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

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

Issue 14456006: Fixes to make scripts generate includes with paths. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Updated to a newer chromium version 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 | « Source/bindings/derived_sources.gyp ('k') | Source/bindings/scripts/generate-bindings.pl » ('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 e348f9f0b10e387e8e91c3ef71600de7d813ee41..59a5d3655269e67dddd54069bae3b895ec92cd77 100644
--- a/Source/bindings/scripts/CodeGeneratorV8.pm
+++ b/Source/bindings/scripts/CodeGeneratorV8.pm
@@ -115,6 +115,8 @@ use File::Basename;
use File::Find;
use File::Spec;
+use idltopath;
+
my $codeGenerator;
my $idlDocument;
my $useDirectories;
@@ -1560,7 +1562,11 @@ END
if ($arrayType) {
if (!SkipIncludeHeader($arrayType)) {
AddToImplIncludes("V8$arrayType.h");
- AddToImplIncludes("$arrayType.h");
+ # Since $arrayType is always ScriptProfile here, and
+ # that ScriptProfile.h is in core/inspector. Or I could
+ # use idlToPath.
+ die unless $arrayType eq "ScriptProfile";
+ AddToImplIncludes("core/inspector/$arrayType.h");
}
$code .= " return v8Array(${getterString}, info.GetIsolate());\n";
$code .= "}\n\n";
@@ -2998,7 +3004,11 @@ sub GenerateSingleBatchedAttribute
# We do not generate the header file for NamedConstructor of class XXXX,
# since we generate the NamedConstructor declaration into the header file of class XXXX.
if ($constructorType !~ /Constructor$/ || $attribute->signature->extendedAttributes->{"CustomConstructor"}) {
- AddToImplIncludes("V8${constructorType}.h", $attribute->signature->extendedAttributes->{"Conditional"});
+ my $includepath = "";
+ if ($constructorType eq "HTMLImageElementConstructor") {
+ $includepath = "bindings/v8/custom/";
+ }
+ AddToImplIncludes("${includepath}V8${constructorType}.h", $attribute->signature->extendedAttributes->{"Conditional"});
}
$data = "&V8${constructorType}::info";
$getter = "${interfaceName}V8Internal::${interfaceName}ConstructorGetter";
@@ -4820,6 +4830,7 @@ sub GetV8HeaderName
return "core/dom/EventListener.h" if $type eq "EventListener";
return "bindings/v8/SerializedScriptValue.h" if $type eq "SerializedScriptValue";
return "bindings/v8/ScriptValue.h" if $type eq "any";
+ return "bindings/v8/V8GCController.h" if $type eq "GCController";
return "V8${type}.h";
}
@@ -5075,7 +5086,8 @@ sub NativeToJSValue
} elsif (IsRefPtrType($arrayOrSequenceType)) {
AddToImplIncludes(GetV8HeaderName($arrayOrSequenceType));
- AddToImplIncludes("${arrayOrSequenceType}.h");
+ my $includepath = idlToPath($arrayOrSequenceType); # This is not an arraytype (always?). It's things like ScriptProfileNode, MediaStreamTream, MediaStreamTream, MediaStream.
+ AddToImplIncludes("${includepath}${arrayOrSequenceType}.h");
}
return "v8Array($value, $getIsolate)";
}
« no previous file with comments | « Source/bindings/derived_sources.gyp ('k') | Source/bindings/scripts/generate-bindings.pl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698