Closed
Bug 1197097
Opened 9 years ago
Closed 9 years ago
JSON.stringify should not use context-wide auto-cycle detection
Categories
(Core :: JavaScript: Standard Library, defect)
Core
JavaScript: Standard Library
Tracking
()
RESOLVED
FIXED
mozilla43
Tracking | Status | |
---|---|---|
firefox43 | --- | fixed |
People
(Reporter: anba, Assigned: Waldo)
References
Details
Attachments
(1 file)
13.03 KB,
patch
|
jonco
:
review+
|
Details | Diff | Splinter Review |
Test case 1: --- a = [{}]; JSON.stringify(a, function(k, v){ JSON.stringify(a); return v; }); --- Test case 2: --- a = [{ toString: () => JSON.stringify(a) }]; a.join(); --- Expected: Both tests return "[{}]" Actual: Throws `TypeError: cyclic object value`
Assignee | ||
Comment 1•9 years ago
|
||
I'm 99% sure this is a regression from bug 888117, which switched us away from a per-JSON.stringify hashset to a global hashset. :-( Bah. Too bad no one was paying attention to semantics when we over-commoned up there. Easy fix. Sort of. ...have I assuaged the worry or made it worse? :-D
Attachment #8650970 -
Flags: review?(jcoppeard)
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → jwalden+bmo
Status: NEW → ASSIGNED
Comment 2•9 years ago
|
||
Comment on attachment 8650970 [details] [diff] [review] Patch Review of attachment 8650970 [details] [diff] [review]: ----------------------------------------------------------------- Looks good to me.
Attachment #8650970 -
Flags: review?(jcoppeard) → review+
Comment 4•9 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/536350cf0da8
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla43
You need to log in
before you can comment on or make changes to this bug.
Description
•