Commit bd96029c authored by mark.lam@apple.com's avatar mark.lam@apple.com

ASSERTION FAILED: !hasError() in JSC::Parser<LexerType>::createSavePoint().

https://bugs.webkit.org/show_bug.cgi?id=126990.

Reviewed by Geoffrey Garen.

Source/JavaScriptCore: 

* 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.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162006 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 8fd8fc24
2014-01-14 Mark Lam <mark.lam@apple.com>
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 <roger_fong@apple.com>
Skip some tests that now fail after r162000.
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.
<html>
<head>
<script>
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
}
</script>
<script src="../resources/parse-syntax-error-in-initializer.js"></script>
<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>
// This test case was contributed by Renata Hodovan <reni@webkit.org>
// for https://bugs.webkit.org/show_bug.cgi?id=126990.
const var_0 = (null < !), var_0 = 1 + { };
2014-01-14 Mark Lam <mark.lam@apple.com>
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 <pecoraro@apple.com>
Web Inspector: For Remote Inspection link WebProcess's to their parent UIProcess
......
......@@ -660,6 +660,7 @@ template <class TreeBuilder> TreeConstDeclList Parser<LexerType>::parseConstDecl
if (hasInitializer) {
next(TreeBuilder::DontBuildStrings); // consume '='
initializer = parseAssignmentExpression(context);
failIfFalse(!!initializer, "Unable to parse initializer");
}
tail = context.appendConstDecl(location, tail, name, initializer);
if (!constDecls)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment