[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

zherczeg at webkit.org zherczeg at webkit.org
Wed Dec 22 14:43:10 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit c54cd3ea7c15b86443523e5d8083ba4293cbfa09
Author: zherczeg at webkit.org <zherczeg at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Oct 18 16:30:12 2010 +0000

    2010-10-18  Zoltan Herczeg  <zherczeg at webkit.org>
    
            Reviewed by Oliver Hunt.
    
            if (0) throw "x" ; else { } throws parse error after r69906
            https://bugs.webkit.org/show_bug.cgi?id=47807
    
            r69906 introduced a bug: the semicolon is not parsed after a throw
            expression anymore. Thus, the semicolon terminates the "if" parsing
            in the example above, and the else token results a parse error.
    
            * parser/JSParser.cpp:
            (JSC::JSParser::parseThrowStatement):
    2010-10-18  Zoltan Herczeg  <zherczeg at webkit.org>
    
            Reviewed by Oliver Hunt.
    
            if (0) throw "x" ; else { } throws parse error after r69906
            https://bugs.webkit.org/show_bug.cgi?id=47807
    
            Adding a new test case to break-ASI.js
    
            * fast/js/break-ASI-expected.txt:
            * fast/js/script-tests/break-ASI.js:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@69963 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/JavaScriptCore/ChangeLog b/JavaScriptCore/ChangeLog
index 23dc942..a2fbd07 100644
--- a/JavaScriptCore/ChangeLog
+++ b/JavaScriptCore/ChangeLog
@@ -1,3 +1,17 @@
+2010-10-18  Zoltan Herczeg  <zherczeg at webkit.org>
+
+        Reviewed by Oliver Hunt.
+
+        if (0) throw "x" ; else { } throws parse error after r69906
+        https://bugs.webkit.org/show_bug.cgi?id=47807
+
+        r69906 introduced a bug: the semicolon is not parsed after a throw
+        expression anymore. Thus, the semicolon terminates the "if" parsing
+        in the example above, and the else token results a parse error.
+
+        * parser/JSParser.cpp:
+        (JSC::JSParser::parseThrowStatement):
+
 2010-10-18  Peter Varga  <pvarga at inf.u-szeged.hu>
 
         Reviewed by Andreas Kling.
diff --git a/JavaScriptCore/parser/JSParser.cpp b/JavaScriptCore/parser/JSParser.cpp
index 7f8cadb..0338210 100644
--- a/JavaScriptCore/parser/JSParser.cpp
+++ b/JavaScriptCore/parser/JSParser.cpp
@@ -900,6 +900,7 @@ template <class TreeBuilder> TreeStatement JSParser::parseThrowStatement(TreeBui
     failIfFalse(expr);
     int eEnd = lastTokenEnd();
     int endLine = tokenLine();
+    failIfFalse(autoSemiColon());
 
     return context.createThrowStatement(expr, eStart, eEnd, startLine, endLine);
 }
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index d2bef8c..b1f2cb3 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,15 @@
+2010-10-18  Zoltan Herczeg  <zherczeg at webkit.org>
+
+        Reviewed by Oliver Hunt.
+
+        if (0) throw "x" ; else { } throws parse error after r69906
+        https://bugs.webkit.org/show_bug.cgi?id=47807
+
+        Adding a new test case to break-ASI.js
+
+        * fast/js/break-ASI-expected.txt:
+        * fast/js/script-tests/break-ASI.js:
+
 2010-10-18  Csaba Osztrogonác  <ossy at webkit.org>
 
         [Qt] Add platform specific expected results for new passing tests.
diff --git a/LayoutTests/fast/js/break-ASI-expected.txt b/LayoutTests/fast/js/break-ASI-expected.txt
index 4a55b7b..a82fe78 100644
--- a/LayoutTests/fast/js/break-ASI-expected.txt
+++ b/LayoutTests/fast/js/break-ASI-expected.txt
@@ -9,6 +9,7 @@ PASS do { if(0) continue
 ;else true; } while (0) is true
 PASS (function(){if (0) return
 ;else return true;})() is true
+PASS do { if(0) throw 'x';else true; } while (0) is true
 PASS if (0) throw
 'Shouldn't have parsed this.'; threw exception SyntaxError: Parse error.
 PASS successfullyParsed is true
diff --git a/LayoutTests/fast/js/script-tests/break-ASI.js b/LayoutTests/fast/js/script-tests/break-ASI.js
index aa14381..c1eb7da 100644
--- a/LayoutTests/fast/js/script-tests/break-ASI.js
+++ b/LayoutTests/fast/js/script-tests/break-ASI.js
@@ -3,6 +3,7 @@ description("Test to make sure we don't incorrectly insert a semi colon after a
 shouldBeTrue("do { if(0) break\n;else true; } while (0)")
 shouldBeTrue("do { if(0) continue\n;else true; } while (0)")
 shouldBeTrue("(function(){if (0) return\n;else return true;})()")
+shouldBeTrue("do { if(0) throw 'x';else true; } while (0)")
 shouldThrow("if (0) throw\n'Shouldn\'t have parsed this.';")
 
 var successfullyParsed = true;

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list