eb18edb4f5
This CL extends the kCircularStructure error message to include the constructors and keys involved in the circle: const a = {}; a.arr = []; a.arr[0] = a; JSON.stringify(a); TypeError: Converting circular structure to JSON --> starting at object with constructor 'Object' | property 'arr' -> object with constructor 'Array' --- index 0 closes the circle R=gsathya@chromium.org, yangguo@chromium.org Bug: v8:6513, v8:8696 Change-Id: I393aa3ce47d8bfd03734fccac63445006940ef7a Reviewed-on: https://chromium-review.googlesource.com/c/1433776 Reviewed-by: Yang Guo <yangguo@chromium.org> Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org> Commit-Queue: Simon Zünd <szuend@chromium.org> Cr-Commit-Position: refs/heads/master@{#59152}
12 lines
396 B
Plaintext
12 lines
396 B
Plaintext
*%(basename)s:9: TypeError: Converting circular structure to JSON
|
|
--> starting at object with constructor 'Object'
|
|
--- property 'key' closes the circle
|
|
JSON.stringify(object);
|
|
^
|
|
TypeError: Converting circular structure to JSON
|
|
--> starting at object with constructor 'Object'
|
|
--- property 'key' closes the circle
|
|
at JSON.stringify (<anonymous>)
|
|
at *%(basename)s:9:6
|
|
|