Index: test/mjsunit/json2.js |
diff --git a/test/mjsunit/json2.js b/test/mjsunit/json2.js |
index 0894d779ac14bf3e885a45584327eab018b64448..f048f05290c9bec50418ee37bb821bf5e8c8d3c4 100644 |
--- a/test/mjsunit/json2.js |
+++ b/test/mjsunit/json2.js |
@@ -105,6 +105,10 @@ var tojson_via_getter = { get toJSON() { |
a: 1 }; |
TestStringify('321', tojson_via_getter); |
+assertThrows(function() { |
+ JSON.stringify({ get toJSON() { throw "error"; } }); |
+}); |
+ |
// Test toJSON with key. |
tojson_obj = { toJSON: function(key) { return key + key; } }; |
var tojson_with_key_1 = { a: tojson_obj, b: tojson_obj }; |