Ignore:
Timestamp:
Dec 15, 2011, 5:45:56 AM (13 years ago)
Author:
[email protected]
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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.