Diff
Modified: trunk/Source/WebCore/ChangeLog (106912 => 106913)
--- trunk/Source/WebCore/ChangeLog 2012-02-07 08:18:40 UTC (rev 106912)
+++ trunk/Source/WebCore/ChangeLog 2012-02-07 08:54:04 UTC (rev 106913)
@@ -1,3 +1,17 @@
+2012-02-07 Kentaro Hara <hara...@chromium.org>
+
+ Unreviewed, rolling out r106862.
+ http://trac.webkit.org/changeset/106862
+ https://bugs.webkit.org/show_bug.cgi?id=77510
+
+ Mac build fails if we manually remove generated code
+
+ * DerivedSources.make:
+ * bindings/scripts/generate-bindings.pl:
+ (generateEmptyHeaderAndCpp):
+ * bindings/scripts/resolve-supplemental.pl:
+ * bindings/scripts/update-idl-needs-rebuild.pl: Removed.
+
2012-02-07 Kaustubh Atrawalkar <kaust...@motorola.com>
Migrate createObjectURL & revokeObjectURL to static (Class) methods.
Modified: trunk/Source/WebCore/DerivedSources.make (106912 => 106913)
--- trunk/Source/WebCore/DerivedSources.make 2012-02-07 08:18:40 UTC (rev 106912)
+++ trunk/Source/WebCore/DerivedSources.make 2012-02-07 08:54:04 UTC (rev 106913)
@@ -584,20 +584,15 @@
DOM_CLASSES=$(basename $(notdir $(BINDING_IDLS)))
JS_DOM_HEADERS=$(filter-out JSMediaQueryListListener.h JSEventListener.h JSEventTarget.h, $(DOM_CLASSES:%=JS%.h))
-JS_IDL_NEEDS_REBUILDS=$(JS_DOM_HEADERS:JS%.h=%.idl-needs-rebuild) _javascript_CallFrame.idl-needs-rebuild
WEB_DOM_HEADERS :=
ifeq ($(findstring BUILDING_WX,$(FEATURE_DEFINES)), BUILDING_WX)
WEB_DOM_HEADERS := $(filter-out WebDOMXSLTProcessor.h WebDOMEventTarget.h, $(DOM_CLASSES:%=WebDOM%.h))
-CPP_IDL_NEEDS_REBUILDS=$(WEB_DOM_HEADERS:WebDOM%.h=%.idl-needs-rebuild)
endif # BUILDING_WX
all : \
$(JS_DOM_HEADERS) \
- $(JS_IDL_NEEDS_REBUILDS) \
- \
$(WEB_DOM_HEADERS) \
- $(CPP_IDL_NEEDS_REBUILDS) \
\
JSJavaScriptCallFrame.h \
\
@@ -917,24 +912,23 @@
JS_BINDINGS_SCRIPTS = $(GENERATE_SCRIPTS) bindings/scripts/CodeGeneratorJS.pm
-SUPPLEMENTAL_DEPENDENCY_FILE = ./supplemental.dep
+SUPPLEMENTAL_DEPENDENCY_FILE = ./supplemental_dependency.tmp
IDL_FILES_TMP = ./idl_files.tmp
+ADDITIONAL_IDLS = $(WebCore)/inspector/_javascript_CallFrame.idl
# The following two lines get a space character stored in a variable.
# See <http://blog.jgc.org/2007/06/escaping-comma-and-space-in-gnu-make.html>.
space :=
space +=
-$(SUPPLEMENTAL_DEPENDENCY_FILE) : $(RESOLVE_SUPPLEMENTAL_SCRIPTS) $(BINDING_IDLS) $(WebCore)/inspector/_javascript_CallFrame.idl
- printf "$(subst $(space),,$(patsubst %,%\n,$(BINDING_IDLS) $(WebCore)/inspector/_javascript_CallFrame.idl))" > $(IDL_FILES_TMP)
- $(call resolve_supplemental_script, $(RESOLVE_SUPPLEMENTAL_SCRIPTS)) --defines "$(FEATURE_DEFINES) $(ADDITIONAL_IDL_DEFINES) LANGUAGE_JAVASCRIPT" --idlFilesList $(IDL_FILES_TMP) --supplementalDependencyFile $@ --newBuildFlow
+$(SUPPLEMENTAL_DEPENDENCY_FILE) : $(RESOLVE_SUPPLEMENTAL_SCRIPTS) $(BINDING_IDLS) $(ADDITIONAL_IDLS)
+ printf "$(subst $(space),,$(patsubst %,%\n,$(BINDING_IDLS) $(ADDITIONAL_IDLS)))" > $(IDL_FILES_TMP)
+ $(call resolve_supplemental_script, $(RESOLVE_SUPPLEMENTAL_SCRIPTS)) --defines "$(FEATURE_DEFINES) $(ADDITIONAL_IDL_DEFINES) LANGUAGE_JAVASCRIPT" --idlFilesList $(IDL_FILES_TMP) --supplementalDependencyFile $@
rm -f $(IDL_FILES_TMP)
-%.idl-needs-rebuild : %.idl $(SUPPLEMENTAL_DEPENDENCY_FILE) $(WebCore)/bindings/scripts/update-idl-needs-rebuild.pl
- perl $(WebCore)/bindings/scripts/update-idl-needs-rebuild.pl --supplementalDependencyFile $(SUPPLEMENTAL_DEPENDENCY_FILE) --idlFile $<
+JS%.h : %.idl $(JS_BINDINGS_SCRIPTS) $(SUPPLEMENTAL_DEPENDENCY_FILE)
+ $(call generator_script, $(JS_BINDINGS_SCRIPTS)) $(IDL_COMMON_ARGS) --defines "$(FEATURE_DEFINES) $(ADDITIONAL_IDL_DEFINES) LANGUAGE_JAVASCRIPT" --generator JS --supplementalDependencyFile $(SUPPLEMENTAL_DEPENDENCY_FILE) $<
-JS%.h : %.idl-needs-rebuild $(JS_BINDINGS_SCRIPTS)
- $(call generator_script, $(JS_BINDINGS_SCRIPTS)) $(IDL_COMMON_ARGS) --defines "$(FEATURE_DEFINES) $(ADDITIONAL_IDL_DEFINES) LANGUAGE_JAVASCRIPT" --generator JS --supplementalDependencyFile $(SUPPLEMENTAL_DEPENDENCY_FILE) --idlNeedsRebuildFile $< --newBuildFlow
# Inspector interfaces generator
@@ -960,8 +954,8 @@
ifeq ($(findstring BUILDING_WX,$(FEATURE_DEFINES)), BUILDING_WX)
CPP_BINDINGS_SCRIPTS = $(GENERATE_SCRIPTS) bindings/scripts/CodeGeneratorCPP.pm
-WebDOM%.h : %.idl-needs-rebuild $(CPP_BINDINGS_SCRIPTS)
- $(call generator_script, $(CPP_BINDINGS_SCRIPTS)) $(IDL_COMMON_ARGS) --defines "$(FEATURE_DEFINES) $(ADDITIONAL_IDL_DEFINES) LANGUAGE_CPP" --generator CPP --supplementalDependencyFile $(SUPPLEMENTAL_DEPENDENCY_FILE) --idlNeedsRebuildFile $< --newBuildFlow
+WebDOM%.h : %.idl $(CPP_BINDINGS_SCRIPTS) $(SUPPLEMENTAL_DEPENDENCY_FILE)
+ $(call generator_script, $(CPP_BINDINGS_SCRIPTS)) $(IDL_COMMON_ARGS) --defines "$(FEATURE_DEFINES) $(ADDITIONAL_IDL_DEFINES) LANGUAGE_CPP" --generator CPP --supplementalDependencyFile $(SUPPLEMENTAL_DEPENDENCY_FILE) $<
endif # BUILDING_WX
# ------------------------
@@ -971,9 +965,8 @@
ifeq ($(OS),MACOS)
OBJC_DOM_HEADERS=$(filter-out DOMDOMWindow.h DOMDOMMimeType.h DOMDOMPlugin.h,$(DOM_CLASSES:%=DOM%.h))
-OBJC_IDL_NEEDS_REBUILDS=$(OBJC_DOM_HEADERS:DOM%.h=%.idl-needs-rebuild)
-all : $(OBJC_DOM_HEADERS) $(OBJC_IDL_NEEDS_REBUILDS)
+all : $(OBJC_DOM_HEADERS)
all : CharsetData.cpp
@@ -1004,8 +997,8 @@
# Objective-C bindings
DOM_BINDINGS_SCRIPTS = $(GENERATE_BINDING_SCRIPTS) bindings/scripts/CodeGeneratorObjC.pm
-DOM%.h : %.idl-needs-rebuild $(DOM_BINDINGS_SCRIPTS) bindings/objc/PublicDOMInterfaces.h
- $(call generator_script, $(DOM_BINDINGS_SCRIPTS)) $(IDL_COMMON_ARGS) --defines "$(FEATURE_DEFINES) $(ADDITIONAL_IDL_DEFINES) LANGUAGE_OBJECTIVE_C" --generator ObjC --supplementalDependencyFile $(SUPPLEMENTAL_DEPENDENCY_FILE) --idlNeedsRebuildFile $< --newBuildFlow
+DOM%.h : %.idl $(DOM_BINDINGS_SCRIPTS) $(SUPPLEMENTAL_DEPENDENCY_FILE) bindings/objc/PublicDOMInterfaces.h
+ $(call generator_script, $(DOM_BINDINGS_SCRIPTS)) $(IDL_COMMON_ARGS) --defines "$(FEATURE_DEFINES) $(ADDITIONAL_IDL_DEFINES) LANGUAGE_OBJECTIVE_C" --generator ObjC --supplementalDependencyFile $(SUPPLEMENTAL_DEPENDENCY_FILE) $<
-include $(OBJC_DOM_HEADERS:.h=.dep)
Modified: trunk/Source/WebCore/bindings/scripts/generate-bindings.pl (106912 => 106913)
--- trunk/Source/WebCore/bindings/scripts/generate-bindings.pl 2012-02-07 08:18:40 UTC (rev 106912)
+++ trunk/Source/WebCore/bindings/scripts/generate-bindings.pl 2012-02-07 08:54:04 UTC (rev 106913)
@@ -50,8 +50,6 @@
my $verbose;
my $supplementalDependencyFile;
my $additionalIdlFilesList;
-my $idlNeedsRebuildFile;
-my $newBuildFlow;
GetOptions('include=s@' => \@idlDirectories,
'outputDir=s' => \$outputDirectory,
@@ -64,28 +62,12 @@
'verbose' => \$verbose,
'write-dependencies' => \$writeDependencies,
'supplementalDependencyFile=s' => \$supplementalDependencyFile,
- 'additionalIdlFilesList=s' => \$additionalIdlFilesList,
- 'idlNeedsRebuildFile=s' => \$idlNeedsRebuildFile,
- # FIXME: After supporting the new build flow in all build systems (bug 76970),
- # we should remove the --newBuildFlow option.
- 'newBuildFlow' => \$newBuildFlow);
+ 'additionalIdlFilesList=s' => \$additionalIdlFilesList);
my $targetIdlFile = $ARGV[0];
-if ($idlNeedsRebuildFile) {
- open FH, "<", $idlNeedsRebuildFile or die "Couldn't open $idlNeedsRebuildFile: $!";
- while (<FH>) {
- chomp;
- if (/^IDLFile=(.*)$/) {
- $targetIdlFile = $1;
- last;
- }
- }
- close FH;
-}
-
die('Must specify input file.') unless defined($targetIdlFile);
-die('Must specify generator.') unless defined($generator);
+die('Must specify generator') unless defined($generator);
die('Must specify output directory.') unless defined($outputDirectory);
if (!$outputHeadersDirectory) {
@@ -100,55 +82,25 @@
my $idlFound = 0;
my @supplementedIdlFiles;
if ($supplementalDependencyFile) {
- # FIXME: After supporting the new build flow in all build systems (bug 76970),
- # we should remove this if statement.
- if ($newBuildFlow) {
- # The format of a supplemental dependency file:
- #
- # DOMWindow.idl(1000) P.idl(800) Q.idl(1200) R.idl(1000)
- # Document.idl(1000) S.idl(800)
- # Event.idl(1200)
- # ...
- #
- # The above indicates that DOMWindow.idl is supplemented by P.idl, Q.idl and R.idl,
- # Document.idl is supplemented by S.idl, and Event.idl is supplemented by no IDLs.
- # The IDL that supplements another IDL (e.g. P.idl) never appears in the dependency file.
- # The number in () is the last access timestamp of the file.
- open FH, "<", $supplementalDependencyFile or die "Cannot open $supplementalDependencyFile\n";
- while (my $line = <FH>) {
- my ($idlFileEntry, @supplementalIdlFileEntries) = split(/\s+/, $line);
- die "The format of supplemental.dep is wrong\n" unless $idlFileEntry =~ /^([^\(]*)\(\d+\)$/;
- my $idlFile = $1;
- if (basename($idlFile) eq basename($targetIdlFile)) {
- $idlFound = 1;
- for my $supplementalIdlFileEntry (@supplementalIdlFileEntries) {
- die "The format of supplemental.dep is wrong\n" unless $supplementalIdlFileEntry =~ /^([^\(]*)\(\d+\)$/;
- push @supplementedIdlFiles, $1;
- }
- }
+ # The format of a supplemental dependency file:
+ #
+ # DOMWindow.idl P.idl Q.idl R.idl
+ # Document.idl S.idl
+ # Event.idl
+ # ...
+ #
+ # The above indicates that DOMWindow.idl is supplemented by P.idl, Q.idl and R.idl,
+ # Document.idl is supplemented by S.idl, and Event.idl is supplemented by no IDLs.
+ # The IDL that supplements another IDL (e.g. P.idl) never appears in the dependency file.
+ open FH, "< $supplementalDependencyFile" or die "Cannot open $supplementalDependencyFile\n";
+ while (my $line = <FH>) {
+ my ($idlFile, @followingIdlFiles) = split(/\s+/, $line);
+ if ($idlFile and basename($idlFile) eq basename($targetIdlFile)) {
+ $idlFound = 1;
+ @supplementedIdlFiles = @followingIdlFiles;
}
- close FH;
- } else {
- # The format of a supplemental dependency file:
- #
- # DOMWindow.idl P.idl Q.idl R.idl
- # Document.idl S.idl
- # Event.idl
- # ...
- #
- # The above indicates that DOMWindow.idl is supplemented by P.idl, Q.idl and R.idl,
- # Document.idl is supplemented by S.idl, and Event.idl is supplemented by no IDLs.
- # The IDL that supplements another IDL (e.g. P.idl) never appears in the dependency file.
- open FH, "<", $supplementalDependencyFile or die "Cannot open $supplementalDependencyFile\n";
- while (my $line = <FH>) {
- my ($idlFile, @followingIdlFiles) = split(/\s+/, $line);
- if ($idlFile and basename($idlFile) eq basename($targetIdlFile)) {
- $idlFound = 1;
- @supplementedIdlFiles = @followingIdlFiles;
- }
- }
- close FH;
}
+ close FH;
# The file $additionalIdlFilesList contains one IDL file per line:
# P.idl
@@ -158,7 +110,7 @@
# (i.e. they are not described in the supplemental dependency file)
# but should generate .h and .cpp files.
if (!$idlFound and $additionalIdlFilesList) {
- open FH, "<", $additionalIdlFilesList or die "Cannot open $additionalIdlFilesList\n";
+ open FH, "< $additionalIdlFilesList" or die "Cannot open $additionalIdlFilesList\n";
my @idlFiles = <FH>;
chomp(@idlFiles);
$idlFound = grep { $_ and basename($_) eq basename($targetIdlFile) } @idlFiles;
@@ -255,11 +207,11 @@
$cppName at every build. This file must not be tried to compile.
*/
";
- open FH, ">", "${outputHeadersDirectory}/${headerName}" or die "Cannot open $headerName\n";
+ open FH, "> ${outputHeadersDirectory}/${headerName}" or die "Cannot open $headerName\n";
print FH $contents;
close FH;
- open FH, ">", "${outputDirectory}/${cppName}" or die "Cannot open $cppName\n";
+ open FH, "> ${outputDirectory}/${cppName}" or die "Cannot open $cppName\n";
print FH $contents;
close FH;
}
Modified: trunk/Source/WebCore/bindings/scripts/resolve-supplemental.pl (106912 => 106913)
--- trunk/Source/WebCore/bindings/scripts/resolve-supplemental.pl 2012-02-07 08:18:40 UTC (rev 106912)
+++ trunk/Source/WebCore/bindings/scripts/resolve-supplemental.pl 2012-02-07 08:54:04 UTC (rev 106913)
@@ -31,16 +31,12 @@
my $verbose;
my $idlFilesList;
my $supplementalDependencyFile;
-my $newBuildFlow;
GetOptions('defines=s' => \$defines,
'preprocessor=s' => \$preprocessor,
'verbose' => \$verbose,
'idlFilesList=s' => \$idlFilesList,
- 'supplementalDependencyFile=s' => \$supplementalDependencyFile,
- # FIXME: After supporting the new build flow in all build systems (bug 76970),
- # we should remove the --newBuildFlow option.
- 'newBuildFlow' => \$newBuildFlow);
+ 'supplementalDependencyFile=s' => \$supplementalDependencyFile);
die('Must specify #define macros using --defines.') unless defined($defines);
die('Must specify an output file using --supplementalDependencyFile.') unless defined($supplementalDependencyFile);
@@ -50,7 +46,7 @@
print "Resolving [Supplemental=XXX] dependencies in all IDL files.\n";
}
-open FH, "<", $idlFilesList or die "Cannot open $idlFilesList\n";
+open FH, "< $idlFilesList" or die "Cannot open $idlFilesList\n";
my @idlFiles = <FH>;
chomp(@idlFiles);
close FH;
@@ -81,50 +77,19 @@
}
}
-# FIXME: After supporting the new build flow in all build systems (bug 76970),
-# we should remove this if statement.
-if ($newBuildFlow) {
- # The format of a supplemental dependency file:
- #
- # DOMWindow.idl(1000) P.idl(800) Q.idl(1200) R.idl(1000)
- # Document.idl(1000) S.idl(800)
- # Event.idl(1200)
- # ...
- #
- # The above indicates that DOMWindow.idl is supplemented by P.idl, Q.idl and R.idl,
- # Document.idl is supplemented by S.idl, and Event.idl is supplemented by no IDLs.
- # The IDL that supplements another IDL (e.g. P.idl) never appears in the dependency file.
- # The number in () is the last access timestamp of the file.
- open FH, ">", $supplementalDependencyFile or die "Cannot open $supplementalDependencyFile\n";
- foreach my $idlFile (sort keys %supplementals) {
- print FH $idlFile . "(" . timestamp($idlFile) . ")";
- for my $supplementalIdlFile (@{$supplementals{$idlFile}}) {
- print FH " " . $supplementalIdlFile . "(" . timestamp($supplementalIdlFile) . ")";
- }
- print FH "\n";
- }
- close FH;
-} else {
- # The format of a supplemental dependency file:
- #
- # DOMWindow.idl P.idl Q.idl R.idl
- # Document.idl S.idl
- # Event.idl
- # ...
- #
- # The above indicates that DOMWindow.idl is supplemented by P.idl, Q.idl and R.idl,
- # Document.idl is supplemented by S.idl, and Event.idl is supplemented by no IDLs.
- # The IDL that supplements another IDL (e.g. P.idl) never appears in the dependency file.
- open FH, ">", $supplementalDependencyFile or die "Cannot open $supplementalDependencyFile\n";
- foreach my $idlFile (sort keys %supplementals) {
- print FH $idlFile, " @{$supplementals{$idlFile}}\n";
- }
- close FH;
+# Outputs the dependency.
+# The format of a supplemental dependency file:
+#
+# DOMWindow.idl P.idl Q.idl R.idl
+# Document.idl S.idl
+# Event.idl
+# ...
+#
+# The above indicates that DOMWindow.idl is supplemented by P.idl, Q.idl and R.idl,
+# Document.idl is supplemented by S.idl, and Event.idl is supplemented by no IDLs.
+# The IDL that supplements another IDL (e.g. P.idl) never appears in the dependency file.
+open FH, "> $supplementalDependencyFile" or die "Cannot open $supplementalDependencyFile\n";
+foreach my $idlFile (sort keys %supplementals) {
+ print FH $idlFile, " @{$supplementals{$idlFile}}\n";
}
-
-sub timestamp
-{
- my $file = shift;
- return 0 if ! -e $file;
- return (stat $file)[9];
-}
+close FH;
Deleted: trunk/Source/WebCore/bindings/scripts/update-idl-needs-rebuild.pl (106912 => 106913)
--- trunk/Source/WebCore/bindings/scripts/update-idl-needs-rebuild.pl 2012-02-07 08:18:40 UTC (rev 106912)
+++ trunk/Source/WebCore/bindings/scripts/update-idl-needs-rebuild.pl 2012-02-07 08:54:04 UTC (rev 106913)
@@ -1,90 +0,0 @@
-#!/usr/bin/perl -w
-#
-# Copyright (C) 2012 Google Inc. All rights reserved.
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Library General Public
-# License as published by the Free Software Foundation; either
-# version 2 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Library General Public License for more details.
-#
-# You should have received a copy of the GNU Library General Public License
-# along with this library; see the file COPYING.LIB. If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-# Boston, MA 02110-1301, USA.
-#
-
-use strict;
-
-use File::Basename;
-use Getopt::Long;
-
-my $idlFile;
-my $supplementalDependencyFile;
-
-GetOptions('supplementalDependencyFile=s' => \$supplementalDependencyFile,
- 'idlFile=s' => \$idlFile);
-
-die "Must specify an IDL file." unless $idlFile;
-die "Must specify a supplemental dependency file." unless $supplementalDependencyFile;
-
-# Touches .idl-needs-rebuild if .idl-needs-rebuild is older than this IDL file.
-my $idlNeedsRebuildFile = basename($idlFile) . "-needs-rebuild";
-my $timeStampOfIdlNeedsRebuildFile = timestamp($idlNeedsRebuildFile);
-if ($timeStampOfIdlNeedsRebuildFile < timestamp($idlFile)) {
- touch($idlNeedsRebuildFile);
- exit;
-}
-
-
-# The format of a supplemental dependency file:
-#
-# DOMWindow.idl(1000) P.idl(800) Q.idl(1200) R.idl(1000)
-# Document.idl(1000) S.idl(800)
-# Event.idl(1200)
-# ...
-#
-# The above indicates that DOMWindow.idl is supplemented by P.idl, Q.idl and R.idl,
-# Document.idl is supplemented by S.idl, and Event.idl is supplemented by no IDLs.
-# The IDL that supplements another IDL (e.g. P.idl) never appears in the dependency file.
-# The number in () is the last access timestamp of the file.
-open FH, "<", $supplementalDependencyFile or die "Couldn't open $supplementalDependencyFile: $!";
-while (my $line = <FH>) {
- my ($idlFileEntry, @supplementalIdlFileEntries) = split(/\s+/, $line);
- die "The format of supplemental.dep is wrong\n" unless $idlFileEntry =~ /^([^\(]*)\((\d+)\)$/;
- next if (basename($1) ne basename($idlFile));
- my $timeStampOfIdlFile = $2;
- # Touches .idl-needs-rebuild if there is at least one supplemental IDL file which is newer than this IDL file.
- for my $supplementalIdlFileEntry (@supplementalIdlFileEntries) {
- die "The format of supplemental.dep is wrong\n" unless $supplementalIdlFileEntry =~ /^(?:[^\(]*)\((\d+)\)$/;
- my $timeStampOfSupplementalIdlFile = $1;
- if ($timeStampOfIdlNeedsRebuildFile < $timeStampOfSupplementalIdlFile) {
- touch($idlNeedsRebuildFile);
- last;
- }
- }
- last;
-}
-close FH;
-
-sub touch
-{
- my $file = shift;
-
- open FH, ">", $file or die "Couldn't open $file: $!";
- my $basename = basename($file);
- print FH "This file is used by build scripts only. The timestamp of this file determines whether ${basename}.idl should be rebuilt or not.\n\n";
- print FH "IDLFile=$idlFile\n";
- close FH;
-}
-
-sub timestamp
-{
- my $file = shift;
- return 0 if ! -e $file;
- return (stat $file)[9];
-}