Title: [162006] trunk
Revision
162006
Author
[email protected]
Date
2014-01-14 14:11:43 -0800 (Tue, 14 Jan 2014)

Log Message

ASSERTION FAILED: !hasError() in JSC::Parser<LexerType>::createSavePoint().
https://bugs.webkit.org/show_bug.cgi?id=126990.

Reviewed by Geoffrey Garen.

Source/_javascript_Core: 

* parser/Parser.cpp:
(JSC::Parser<LexerType>::parseConstDeclarationList):
- We were missing an error check after attempting to parse an initializer
  _expression_. This is now fixed.

LayoutTests: 

* js/dom/parse-syntax-error-in-initializer-expected.txt: Added.
* js/dom/parse-syntax-error-in-initializer.html: Added.
* js/resources/parse-syntax-error-in-initializer.js: Added.
- Added bug test case as a regression test.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (162005 => 162006)


--- trunk/LayoutTests/ChangeLog	2014-01-14 22:10:40 UTC (rev 162005)
+++ trunk/LayoutTests/ChangeLog	2014-01-14 22:11:43 UTC (rev 162006)
@@ -1,3 +1,15 @@
+2014-01-14  Mark Lam  <[email protected]>
+
+        ASSERTION FAILED: !hasError() in JSC::Parser<LexerType>::createSavePoint().
+        https://bugs.webkit.org/show_bug.cgi?id=126990.
+
+        Reviewed by Geoffrey Garen.
+
+        * js/dom/parse-syntax-error-in-initializer-expected.txt: Added.
+        * js/dom/parse-syntax-error-in-initializer.html: Added.
+        * js/resources/parse-syntax-error-in-initializer.js: Added.
+        - Added bug test case as a regression test.
+
 2014-01-14  Roger Fong  <[email protected]>
 
         Skip some tests that now fail after r162000.

Added: trunk/LayoutTests/js/dom/parse-syntax-error-in-initializer-expected.txt (0 => 162006)


--- trunk/LayoutTests/js/dom/parse-syntax-error-in-initializer-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/js/dom/parse-syntax-error-in-initializer-expected.txt	2014-01-14 22:11:43 UTC (rev 162006)
@@ -0,0 +1,2 @@
+CONSOLE MESSAGE: line 3: SyntaxError: Unexpected token ')'
+This tests that a line number and error message is printed for a parse error in a separate source file.

Added: trunk/LayoutTests/js/dom/parse-syntax-error-in-initializer.html (0 => 162006)


--- trunk/LayoutTests/js/dom/parse-syntax-error-in-initializer.html	                        (rev 0)
+++ trunk/LayoutTests/js/dom/parse-syntax-error-in-initializer.html	2014-01-14 22:11:43 UTC (rev 162006)
@@ -0,0 +1,19 @@
+<html>
+<head>
+<script>
+if (window.testRunner) {
+    testRunner.dumpAsText();
+    testRunner.waitUntilDone();
+}
+</script>
+<script src=""
+<script>
+if (window.testRunner) {
+    testRunner.notifyDone();
+}
+</script>
+</head>
+<body>
+This tests that a line number and error message is printed for a parse error in a separate source file.
+</body>
+</html>

Added: trunk/LayoutTests/js/resources/parse-syntax-error-in-initializer.js (0 => 162006)


--- trunk/LayoutTests/js/resources/parse-syntax-error-in-initializer.js	                        (rev 0)
+++ trunk/LayoutTests/js/resources/parse-syntax-error-in-initializer.js	2014-01-14 22:11:43 UTC (rev 162006)
@@ -0,0 +1,3 @@
+// This test case was contributed by Renata Hodovan <[email protected]>
+// for https://bugs.webkit.org/show_bug.cgi?id=126990.
+const var_0 = (null < !), var_0 = 1 + { };

Modified: trunk/Source/_javascript_Core/ChangeLog (162005 => 162006)


--- trunk/Source/_javascript_Core/ChangeLog	2014-01-14 22:10:40 UTC (rev 162005)
+++ trunk/Source/_javascript_Core/ChangeLog	2014-01-14 22:11:43 UTC (rev 162006)
@@ -1,3 +1,15 @@
+2014-01-14  Mark Lam  <[email protected]>
+
+        ASSERTION FAILED: !hasError() in JSC::Parser<LexerType>::createSavePoint().
+        https://bugs.webkit.org/show_bug.cgi?id=126990.
+
+        Reviewed by Geoffrey Garen.
+
+        * parser/Parser.cpp:
+        (JSC::Parser<LexerType>::parseConstDeclarationList):
+        - We were missing an error check after attempting to parse an initializer
+          _expression_. This is now fixed.
+
 2014-01-14  Joseph Pecoraro  <[email protected]>
 
         Web Inspector: For Remote Inspection link WebProcess's to their parent UIProcess

Modified: trunk/Source/_javascript_Core/parser/Parser.cpp (162005 => 162006)


--- trunk/Source/_javascript_Core/parser/Parser.cpp	2014-01-14 22:10:40 UTC (rev 162005)
+++ trunk/Source/_javascript_Core/parser/Parser.cpp	2014-01-14 22:11:43 UTC (rev 162006)
@@ -660,6 +660,7 @@
         if (hasInitializer) {
             next(TreeBuilder::DontBuildStrings); // consume '='
             initializer = parseAssignmentExpression(context);
+            failIfFalse(!!initializer, "Unable to parse initializer");
         }
         tail = context.appendConstDecl(location, tail, name, initializer);
         if (!constDecls)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to