Title: [101153] trunk/Source/WebCore
- Revision
- 101153
- Author
- [email protected]
- Date
- 2011-11-24 23:10:38 -0800 (Thu, 24 Nov 2011)
Log Message
Initialize global variables during IDLParser object creation
https://bugs.webkit.org/show_bug.cgi?id=73108
Reviewed by Adam Barth.
Currently, IDLParser.pm initializes global variables in a global scope,
which means that the global variables are initialized just once at the beginning.
On the other hand, implementing [Supplemental] IDL (bug 72138) requires a change
on generate-bindings.pl that initializes the global variables whenever a new IDLParser
object is created. Thus, this patch initializes the global variables during
the IDLParser object creation.
No new tests. No change in behavior.
* bindings/scripts/IDLParser.pm:
(InitializeGlobalData):
(new):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (101152 => 101153)
--- trunk/Source/WebCore/ChangeLog 2011-11-25 06:55:34 UTC (rev 101152)
+++ trunk/Source/WebCore/ChangeLog 2011-11-25 07:10:38 UTC (rev 101153)
@@ -1,3 +1,23 @@
+2011-11-24 Kentaro Hara <[email protected]>
+
+ Initialize global variables during IDLParser object creation
+ https://bugs.webkit.org/show_bug.cgi?id=73108
+
+ Reviewed by Adam Barth.
+
+ Currently, IDLParser.pm initializes global variables in a global scope,
+ which means that the global variables are initialized just once at the beginning.
+ On the other hand, implementing [Supplemental] IDL (bug 72138) requires a change
+ on generate-bindings.pl that initializes the global variables whenever a new IDLParser
+ object is created. Thus, this patch initializes the global variables during
+ the IDLParser object creation.
+
+ No new tests. No change in behavior.
+
+ * bindings/scripts/IDLParser.pm:
+ (InitializeGlobalData):
+ (new):
+
2011-11-24 Patrick Gansterer <[email protected]>
[CMake] Build fix for NOT ENABLE_WEB_SOCKETS.
Modified: trunk/Source/WebCore/bindings/scripts/IDLParser.pm (101152 => 101153)
--- trunk/Source/WebCore/bindings/scripts/IDLParser.pm 2011-11-25 06:55:34 UTC (rev 101152)
+++ trunk/Source/WebCore/bindings/scripts/IDLParser.pm 2011-11-25 07:10:38 UTC (rev 101153)
@@ -34,22 +34,34 @@
use constant MODE_INTERFACE => 11; # 'interface' section
# Helper variables
-my @temporaryContent = "";
+my @temporaryContent;
-my $parseMode = MODE_UNDEF;
-my $preservedParseMode = MODE_UNDEF;
+my $parseMode;
+my $preservedParseMode;
my $beQuiet; # Should not display anything on STDOUT?
-my $document = 0; # Will hold the resulting 'idlDocument'
-my $parentsOnly = 0; # If 1, parse only enough to populate parents list
+my $document; # Will hold the resulting 'idlDocument'
+my $parentsOnly; # If 1, parse only enough to populate parents list
+sub InitializeGlobalData
+{
+ @temporaryContent = "";
+
+ $parseMode = MODE_UNDEF;
+ $preservedParseMode = MODE_UNDEF;
+
+ $document = 0;
+ $parentsOnly = 0;
+}
+
# Default Constructor
sub new
{
my $object = shift;
my $reference = { };
- $document = 0;
+ InitializeGlobalData();
+
$beQuiet = shift;
bless($reference, $object);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes