LGTM with test added. I guess the test should succeed because calling the
method
will throw the correct error.
http://codereview.chromium.org/5676005/diff/6001/test/mjsunit/json.js
File test/mjsunit/json.js (right):
http://codereview.chromium.org/5676005/diff/6001/test/mjsunit/json.js#newcode81
test/mjsunit/json.js:81:
Add a test that we throw an exception if we have a toISOString that is
not callable, e.g.:
var d7 = {toJSON: Date.prototype.toJSON,
valueOf: function() { return 42;},
ISOString: 42};
assertThrows(d7.toJSON());
http://codereview.chromium.org/5676005/
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev