Changeset 102931 in webkit


Ignore:
Timestamp:
Dec 15, 2011 5:45:56 AM (12 years ago)
Author:
commit-queue@webkit.org
Message:

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

Patch by Andy Wingo <wingo@igalia.com> 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.

Location:
trunk/Source/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r102917 r102931  
     12011-12-15  Andy Wingo  <wingo@igalia.com>
     2
     3        Minor refactor to Parser::parseTryStatement
     4        https://bugs.webkit.org/show_bug.cgi?id=74507
     5
     6        Reviewed by Geoffrey Garen.
     7
     8        * parser/Parser.cpp (JSC::Parser::parseTryStatement): Use the
     9        Parser's declareVariable instead of going directly to the scope.
     10        This will facilitate future checks related to harmony block
     11        scoping.
     12
    1132011-12-15  Andy Wingo  <wingo@igalia.com>
    214
  • trunk/Source/JavaScriptCore/parser/Parser.cpp

    r100391 r102931  
    624624        next();
    625625        AutoPopScopeRef catchScope(this, pushScope());
    626         failIfFalseIfStrictWithNameAndMessage(catchScope->declareVariable(ident), "Cannot declare a variable named", ident->impl(), "in strict mode");
     626        failIfFalseIfStrictWithNameAndMessage(declareVariable(ident), "Cannot declare a variable named", ident->impl(), "in strict mode");
    627627        catchScope->preventNewDecls();
    628628        consumeOrFail(CLOSEPAREN);
Note: See TracChangeset for help on using the changeset viewer.