Changeset 41053 in webkit for trunk/JavaScriptCore


Ignore:
Timestamp:
Feb 17, 2009, 8:17:47 PM (16 years ago)
Author:
[email protected]
Message:

2009-02-17 Geoffrey Garen <[email protected]>

Reviewed by Sam Weinig.


Fixed failure in js1_5/Regress/regress-168347.js, as seen on the Oliver
bot.


Technically, both behaviors are OK, but we might as well keep this test
passing.

  • runtime/FunctionPrototype.cpp: (JSC::insertSemicolonIfNeeded): No need to add a trailing semicolon after a trailing '}', since '}' ends a block, indicating the end of a statement.
Location:
trunk/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/ChangeLog

    r41052 r41053  
     12009-02-17  Geoffrey Garen  <[email protected]>
     2
     3        Reviewed by Sam Weinig.
     4       
     5        Fixed failure in js1_5/Regress/regress-168347.js, as seen on the Oliver
     6        bot.
     7       
     8        Technically, both behaviors are OK, but we might as well keep this test
     9        passing.
     10
     11        * runtime/FunctionPrototype.cpp:
     12        (JSC::insertSemicolonIfNeeded): No need to add a trailing semicolon
     13        after a trailing '}', since '}' ends a block, indicating the end of a
     14        statement.
     15
    1162009-02-17  Geoffrey Garen  <[email protected]>
    217
  • trunk/JavaScriptCore/runtime/FunctionPrototype.cpp

    r41052 r41053  
    7474        UChar ch = functionBody[i];
    7575        if (!Lexer::isWhiteSpace(ch) && !Lexer::isLineTerminator(ch)) {
    76             if (ch != ';')
     76            if (ch != ';' && ch != '}')
    7777                functionBody = functionBody.substr(0, i + 1) + ";" + functionBody.substr(i + 1, functionBody.size() - (i + 1));
    7878            return;
Note: See TracChangeset for help on using the changeset viewer.