[Webkit-unassigned] [Bug 105282] New: Date.prototype.toJSON does not execute steps 1-2
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Dec 18 05:53:28 PST 2012
https://bugs.webkit.org/show_bug.cgi?id=105282
Summary: Date.prototype.toJSON does not execute steps 1-2
Product: WebKit
Version: 528+ (Nightly build)
Platform: All
OS/Version: All
Status: UNCONFIRMED
Severity: Normal
Priority: P2
Component: JavaScriptCore
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: andre.bargull at gmail.com
test case:
---
> this.toISOString = function(){print("global toISOString")}
function () {print("global toISOString");}
> Date.prototype.toJSON.call(null)
global toISOString
> Date.prototype.toJSON.call(void 0)
global toISOString
> Date.prototype.toJSON.call({ valueOf: function(){print("ToPrimitive(valueOf) called"); return 0}, toISOString: function(){print("toISOString called")} })
toISOString called
---
[ES5.1 - 15.9.5.44 Date.prototype.toJSON] steps 1-2 aren't executed properly:
- the first two calls should raise a TypeError because ToObject() is called with an incompatible argument (step 1 of 15.9.5.44)
- the last call should invoke the supplied valueOf() function (step 2 of 15.9.5.44)
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list