Issue 1792 in v8: Behavior of Date.prototype.toISOString not spec conform

6 views
Skip to first unread message

codesite...@google.com

unread,
Oct 27, 2011, 4:08:58 AM10/27/11
to v8-...@googlegroups.com
Status: Accepted
Owner: mstar...@chromium.org
CC: l...@chromium.org
Labels: Type-Bug Priority-Medium

New issue 1792 by mstar...@chromium.org: Behavior of
Date.prototype.toISOString not spec conform
http://code.google.com/p/v8/issues/detail?id=1792

For cases in which the time value of a Date object is not a finite number,
Date.prototype.toISOString() should throw a RangeError expection. So far V8
did not do that, to be compatible with Firefox and Safari. The situation
should be reevaluated. This is reproducible by several Test262 test cases
(i.e. 15.9.5.43-0-*)

codesite...@google.com

unread,
Oct 27, 2011, 4:29:15 AM10/27/11
to v8-...@googlegroups.com

Comment #1 on issue 1792 by mstar...@chromium.org: Behavior of
Date.prototype.toISOString not spec conform
http://code.google.com/p/v8/issues/detail?id=1792

Opened a bug on the JSC issue tracker:
https://bugs.webkit.org/show_bug.cgi?id=70998

The following is a JavaScript snippet to reproduce the issue without
Test262 test cases:

function test() {
var date = new Date(Infinity, 1, 70, 0, 0, 0);
try {
date.toISOString();
return false;
} catch (e) {
return e instanceof RangeError;
}
}

codesite...@google.com

unread,
Nov 2, 2011, 10:39:53 AM11/2/11
to v8-...@googlegroups.com
Updates:
Status: Fixed

Comment #2 on issue 1792 by mstar...@chromium.org: Behavior of

Date.prototype.toISOString not spec conform
http://code.google.com/p/v8/issues/detail?id=1792

Fixed in r9829. The JSC folks have triaged the issue and will probably fix
it as well.

Reply all
Reply to author
Forward
0 new messages