Closed
Bug 939410
Opened 11 years ago
Closed 11 years ago
JSON.parse() return incorrect error position
Categories
(Core :: JavaScript Engine, enhancement)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla28
People
(Reporter: isk, Assigned: isk)
References
Details
Attachments
(1 file)
914 bytes,
patch
|
Details | Diff | Splinter Review |
I make JSONParser::getTextPosition in bug507998 and I found JSON.parse() return incorrect error position such as below. > js> JSON.parse("[,7,6]") > typein:1:0 SyntaxError: JSON.parse: unexpected character at line 1 column 3 of the JSON data Expected value is "line 1 column 2".
Assignee | ||
Comment 1•11 years ago
|
||
The reason which failed test was simple. JSON::advance() advance "current" pointer in spite of the error. So I reverse "current" pointer when it has error.
Attachment #833323 -
Flags: review?(jorendorff)
Assignee | ||
Updated•11 years ago
|
Attachment #833323 -
Flags: review?(jorendorff) → review?(n.nethercote)
Assignee | ||
Updated•11 years ago
|
Status: NEW → ASSIGNED
Comment 2•11 years ago
|
||
Comment on attachment 833323 [details] [diff] [review] bug939410.patch Is this patch a modification to another patch that hasn't yet landed? It should just be merged into the other patch and the combined patch posted in Bugzilla. Or am I misunderstanding.
Attachment #833323 -
Flags: review?(n.nethercote)
Assignee | ||
Comment 3•11 years ago
|
||
This patch is related to bug507998. This patch should be merge into bug507998's patch?
Comment 4•11 years ago
|
||
Yes please.
Comment 5•11 years ago
|
||
I think you've merged it. So can we close this bug report?
Assignee | ||
Comment 6•11 years ago
|
||
(In reply to Nicholas Nethercote [:njn] from comment #5) > I think you've merged it. So can we close this bug report? Yes.
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•