Title: [102931] trunk/Source/_javascript_Core
Revision
102931
Author
[email protected]
Date
2011-12-15 05:45:56 -0800 (Thu, 15 Dec 2011)

Log Message

Minor refactor to Parser::parseTryStatement
https://bugs.webkit.org/show_bug.cgi?id=74507

Patch by Andy Wingo <[email protected]> on 2011-12-15
Reviewed by Geoffrey Garen.

* parser/Parser.cpp (JSC::Parser::parseTryStatement): Use the
Parser's declareVariable instead of going directly to the scope.
This will facilitate future checks related to harmony block
scoping.

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (102930 => 102931)


--- trunk/Source/_javascript_Core/ChangeLog	2011-12-15 13:36:17 UTC (rev 102930)
+++ trunk/Source/_javascript_Core/ChangeLog	2011-12-15 13:45:56 UTC (rev 102931)
@@ -1,5 +1,17 @@
 2011-12-15  Andy Wingo  <[email protected]>
 
+        Minor refactor to Parser::parseTryStatement
+        https://bugs.webkit.org/show_bug.cgi?id=74507
+
+        Reviewed by Geoffrey Garen.
+
+        * parser/Parser.cpp (JSC::Parser::parseTryStatement): Use the
+        Parser's declareVariable instead of going directly to the scope.
+        This will facilitate future checks related to harmony block
+        scoping.
+
+2011-12-15  Andy Wingo  <[email protected]>
+
         Rename JSC::Heuristics to JSC::Options
         https://bugs.webkit.org/show_bug.cgi?id=72889
 

Modified: trunk/Source/_javascript_Core/parser/Parser.cpp (102930 => 102931)


--- trunk/Source/_javascript_Core/parser/Parser.cpp	2011-12-15 13:36:17 UTC (rev 102930)
+++ trunk/Source/_javascript_Core/parser/Parser.cpp	2011-12-15 13:45:56 UTC (rev 102931)
@@ -623,7 +623,7 @@
         ident = m_token.m_data.ident;
         next();
         AutoPopScopeRef catchScope(this, pushScope());
-        failIfFalseIfStrictWithNameAndMessage(catchScope->declareVariable(ident), "Cannot declare a variable named", ident->impl(), "in strict mode");
+        failIfFalseIfStrictWithNameAndMessage(declareVariable(ident), "Cannot declare a variable named", ident->impl(), "in strict mode");
         catchScope->preventNewDecls();
         consumeOrFail(CLOSEPAREN);
         matchOrFail(OPENBRACE);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to