Please re^2view Date toJSON.
http://codereview.chromium.org/5676005/diff/1/src/date.js File src/date.js (right): http://codereview.chromium.org/5676005/diff/1/src/date.js#newcode989 src/date.js:989: ':' + PadInt(this.getUTCMinutes(), 2) + ':' + PadInt(this.getUTCSeconds(), 2) + Done. http://codereview.chromium.org/5676005/diff/1/src/date.js#newcode1003 src/date.js:1003: return CheckJSONPrimitive(this.toISOString()); Rewritten completely, CheckJSONPrimitive removed and result_not_primitive error message deleted. http://codereview.chromium.org/5676005/diff/1/test/mjsunit/json.js File test/mjsunit/json.js (right): http://codereview.chromium.org/5676005/diff/1/test/mjsunit/json.js#newcode368 test/mjsunit/json.js:368: assertEquals('[37,null,1,"foo","37","true",null,"has toJSON",null,"has toJSON"]', It's a string literal, and the exact output of JSON.stringify, so there's not much to do about the spacing. Will wrap to avoid line > 80. http://codereview.chromium.org/5676005/diff/1/test/mjsunit/json.js#newcode400 test/mjsunit/json.js:400: assertEquals('"42"', JSON.stringify(falseNum)); Adding tests of Date.prototype.toJSON when called as generic function. http://codereview.chromium.org/5676005/ -- v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev
