Closed
Bug 438587
Opened 16 years ago
Closed 6 years ago
JS_EvaluateScript does not report some syntax errors
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: jorendorff, Unassigned)
Details
Attachments
(1 file)
2.01 KB,
text/plain
|
Details |
A simple test program (attached) shows that evaluating '@#' causes a syntax error to be reported and thrown, but evaluating '@' or '#' does not--the error reporter is not called, even though JS_EvaluateScript returns false with a SyntaxError exception pending. The test program doesn't use JSOPTION_DONT_REPORT_UNCAUGHT.
Reporter | ||
Comment 1•16 years ago
|
||
In the case of "@#", js_ReportCompileErrorNumber is called twice (once when js_GetToken fails, and again in jsparse.cpp, when the parser fails to make sense of the resulting TOK_ERROR token). The first error is converted to an exception and not reported. The second error is immediately reported. You can see the two errors in the shell: js> @# typein:4: syntax error: typein:4: @# typein:4: .^ typein:4: SyntaxError: illegal character: typein:4: @# typein:4: .^ If this qualifies as a bug, then there are two separate bugs here.
Assignee | ||
Updated•10 years ago
|
Assignee: general → nobody
Comment 2•6 years ago
|
||
Seems to be fixed: js> @# typein:1:0 SyntaxError: illegal character: typein:1:0 @# typein:1:0 ^ Therefore resolving as WFM.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•