Closed Bug 641479 Opened 14 years ago Closed 14 years ago

"Assertion failure: !cx->isExceptionPending()" with JSON.parse

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
critical

Tracking

()

RESOLVED FIXED

People

(Reporter: jandem, Unassigned)

References

Details

(Keywords: assertion, testcase)

-- function f() { throw 2; } JSON.parse(f, f); -- $ ./js test.js Assertion failure: !cx->isExceptionPending(), at ../jsinterp.cpp:6178 In a release build this prints uncaught exception: 2
The new parser fixes this. I'm not 100% sure why the old parser was broken here, might also possibly be the scaffolding around the parsing code that was at fault (and got reorganized slightly in the rewrite). We need to add this test before closing this out as WFM: try { var r = JSON.parse("function f() {\n throw 2;\n}", function() { throw 2; }); throw new Error("didn't throw, returned " + r); } catch (e) { assertEq(e instanceof SyntaxError, true); }
Depends on: 589664
Fixed by the new parser.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.