WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED DUPLICATE of
bug 62613
42181
JSC parse errors don't show enough detail
https://bugs.webkit.org/show_bug.cgi?id=42181
Summary
JSC parse errors don't show enough detail
Eric Seidel (no email)
Reported
2010-07-13 11:30:16 PDT
== JSC == CONSOLE MESSAGE: line 1: SyntaxError: Parse error == V8 == CONSOLE MESSAGE: line 1: Uncaught SyntaxError: Unexpected token < Arguably V8 is in the wrong here, since JSC is the standard engine for WebKit. However, I think it's nice that V8 shows the token which is unexpected. Would be even better if both error messages told the column number (since clearly V8 has it and JSC should be able to get it).
Attachments
Add attachment
proposed patch, testcase, etc.
Eric Seidel (no email)
Comment 1
2010-07-13 11:33:47 PDT
This bug came up because we were asking the V8 team to change their errors to match JSC (to minimize chromium layout test differences). They noted that in this case their error is "better". I agree, that at least the "unexpected token" part is nice. In then end, I don't personally care which engine's messages they both converge on, but it would unfork about a zillion layout test results if they were made identical. In the case of this bug, v8 can change to be identical to JSC here, however I think JSC should probably also consider adding information about exact location of the syntax error.
Zoltan Herczeg
Comment 2
2010-07-13 11:53:28 PDT
You talk only about parse errors, or something in general? If it related only for parse error, I suggest to change the bug title. Anyway, I think the recursive descent parser should be able handle it, the last token is still kept in the lexer after an error. If the others like the idea, I volunteer to implement the patch.
Adam Barth
Comment 3
2010-07-13 12:00:26 PDT
Let's start with parse errors, since those are pretty useful to web devs.
Zoltan Herczeg
Comment 4
2010-07-22 06:32:33 PDT
Any decision here? (It is not worth to start working on it before I hear the opinion of JSC developers. We need to decide the full format of syntax error as well)
Gavin Barraclough
Comment 5
2011-08-12 01:10:36 PDT
*** This bug has been marked as a duplicate of
bug 62613
***
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug