Index: Source/bindings/scripts/CodeGeneratorV8.pm |
diff --git a/Source/bindings/scripts/CodeGeneratorV8.pm b/Source/bindings/scripts/CodeGeneratorV8.pm |
index 3c312c89fa49c235a8fc2eaea7a89d767ca086ee..3e011f142c355ab7dba1b5cfffa2d5a470c5fa74 100644 |
--- a/Source/bindings/scripts/CodeGeneratorV8.pm |
+++ b/Source/bindings/scripts/CodeGeneratorV8.pm |
@@ -94,6 +94,11 @@ sub AddToImplIncludes |
my $header = shift; |
my $conditional = shift; |
+ if ($header eq "Storage.h") { |
+ print caller; |
+ print "foo\n"; |
+ } |
+ |
if (not $conditional) { |
$implIncludes{$header} = 1; |
} elsif (not exists($implIncludes{$header})) { |
@@ -111,6 +116,14 @@ sub AddToImplIncludes |
} |
} |
+sub AddInterfaceToImplIncludes |
+{ |
+ my $interface = shift; |
+ my $include = $codeGenerator->HFileForInterface($interface); |
+ |
+ AddToImplIncludes($include); |
+} |
+ |
sub AddToHeader |
{ |
my $code = shift; |
@@ -681,13 +694,14 @@ sub GetInternalFields |
sub GetHeaderClassInclude |
{ |
- my $v8InterfaceName = shift; |
- if ($v8InterfaceName =~ /SVGPathSeg/) { |
- $v8InterfaceName =~ s/Abs|Rel//; |
+ my $interfaceName = shift; |
+ if ($interfaceName =~ /SVGPathSeg/) { |
+ $interfaceName =~ s/Abs|Rel//; |
+ return "${interfaceName}.h"; |
} |
- return "wtf/${v8InterfaceName}.h" if $codeGenerator->IsTypedArrayType($v8InterfaceName); |
- return "" if ($codeGenerator->SkipIncludeHeader($v8InterfaceName)); |
- return "${v8InterfaceName}.h"; |
+ return "wtf/${interfaceName}.h" if $codeGenerator->IsTypedArrayType($interfaceName); |
+ return "" if ($codeGenerator->SkipIncludeHeader($interfaceName)); |
+ return $codeGenerator->HFileForInterface($interfaceName); |
} |
sub GenerateHeaderCustomInternalFieldIndices |
@@ -1164,7 +1178,7 @@ END |
push(@arguments, "ec") if $useExceptions; |
if ($attribute->signature->extendedAttributes->{"ImplementedBy"}) { |
my $implementedBy = $attribute->signature->extendedAttributes->{"ImplementedBy"}; |
- AddToImplIncludes("${implementedBy}.h"); |
+ AddInterfaceToImplIncludes($implementedBy); |
unshift(@arguments, "imp") if !$attribute->isStatic; |
$functionName = "${implementedBy}::${functionName}"; |
} elsif ($attribute->isStatic) { |
@@ -1588,7 +1602,7 @@ END |
push(@arguments, "ec") if $useExceptions; |
if ($attribute->signature->extendedAttributes->{"ImplementedBy"}) { |
my $implementedBy = $attribute->signature->extendedAttributes->{"ImplementedBy"}; |
- AddToImplIncludes("${implementedBy}.h"); |
+ AddInterfaceToImplIncludes($implementedBy); |
unshift(@arguments, "imp") if !$attribute->isStatic; |
$functionName = "${implementedBy}::${functionName}"; |
} elsif ($attribute->isStatic) { |
@@ -3348,7 +3362,7 @@ END |
my $conditional = $attrExt->{"Conditional"}; |
my $implementedBy = $attrExt->{"ImplementedBy"}; |
if ($implementedBy) { |
- AddToImplIncludes("${implementedBy}.h"); |
+ AddInterfaceToImplIncludes($implementedBy); |
} |
if ($attrExt->{"EnabledAtRuntime"}) { |
push(@constantsEnabledAtRuntime, $constant); |
@@ -3786,7 +3800,8 @@ sub GenerateCallbackHeader |
my @unsortedIncludes = (); |
push(@unsortedIncludes, "#include \"ActiveDOMCallback.h\""); |
push(@unsortedIncludes, "#include \"DOMWrapperWorld.h\""); |
- push(@unsortedIncludes, "#include \"$interfaceName.h\""); |
+ my $interfaceHeader = $codeGenerator->HFileForInterface($interfaceName); |
+ push(@unsortedIncludes, "#include \"$interfaceHeader\""); |
push(@unsortedIncludes, "#include \"ScopedPersistent.h\""); |
push(@unsortedIncludes, "#include <v8.h>"); |
push(@unsortedIncludes, "#include <wtf/Forward.h>"); |
@@ -4200,7 +4215,7 @@ sub GenerateFunctionCallString |
my $functionName; |
my $implementedBy = $function->signature->extendedAttributes->{"ImplementedBy"}; |
if ($implementedBy) { |
- AddToImplIncludes("${implementedBy}.h"); |
+ AddInterfaceToImplIncludes($implementedBy); |
unshift(@arguments, "imp") if !$function->isStatic; |
$functionName = "${implementedBy}::${name}"; |
} elsif ($function->isStatic) { |