Ignore:
Timestamp:
Jan 14, 2011, 10:35:13 PM (14 years ago)
Author:
[email protected]
Message:

2011-01-14 Oliver Hunt <[email protected]>

Reviewed by Maciej Stachowiak.

[jsfunfuzz] Incorrect handling of consecutive duplicate labels
https://bugs.webkit.org/show_bug.cgi?id=52505

Add a few tests of consecutive labels containing duplicates to the parser check.

  • fast/js/parser-syntax-check-expected.txt:
  • fast/js/script-tests/parser-syntax-check.js:

2011-01-14 Oliver Hunt <[email protected]>

Reviewed by Maciej Stachowiak.

[jsfunfuzz] Incorrect handling of consecutive duplicate labels
https://bugs.webkit.org/show_bug.cgi?id=52505

Compare StringImpl*'s instead of Identifier*'s when looking for duplicate
labels.

  • parser/JSParser.cpp: (JSC::JSParser::parseExpressionOrLabelStatement):
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/parser/JSParser.cpp

    r75852 r75872  
    13091309            // have never seen more than one label in a row in the real world.
    13101310            for (size_t i = 0; i < labels.size(); i++)
    1311                 failIfTrue(ident == labels[i].m_ident);
     1311                failIfTrue(ident->impl() == labels[i].m_ident->impl());
    13121312            failIfTrue(getLabel(ident));
    13131313            labels.append(LabelInfo(ident, start, end));
Note: See TracChangeset for help on using the changeset viewer.