Closed
Bug 1217049
Opened 10 years ago
Closed 10 years ago
Date.prototype.toString should throw when this-object is primitive
Categories
(Core :: JavaScript: Standard Library, defect)
Core
JavaScript: Standard Library
Tracking
()
RESOLVED
FIXED
mozilla45
People
(Reporter: anba, Assigned: Waldo)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
|
3.34 KB,
patch
|
arai
:
review+
|
Details | Diff | Splinter Review |
Test case:
---
Date.prototype.toString.call(null)
---
Expected: Throws TypeError
Actual: Returns "Invalid Date"
Spec:
ES2015, 20.3.4.41 Date.prototype.toString ( ), step 1:
> 1. Let O be this Date object.
"this Date object" is defined in 20.3.4 Properties of the Date Prototype Object:
> In following descriptions of functions that are properties of the Date prototype
> object, the phrase “this Date object” refers to the object that is the this value
> for the invocation of the function. If the Type of the this value is not Object,
> a TypeError exception is thrown.
| Assignee | ||
Comment 1•10 years ago
|
||
Attachment #8677773 -
Flags: review?(arai.unmht)
| Assignee | ||
Updated•10 years ago
|
Assignee: nobody → jwalden+bmo
Status: NEW → ASSIGNED
Updated•10 years ago
|
Attachment #8677773 -
Flags: review?(arai.unmht) → review+
Comment 3•10 years ago
|
||
| bugherder | ||
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
status-firefox45:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla45
Comment 4•10 years ago
|
||
| bugherder uplift | ||
status-b2g-v2.5:
--- → fixed
You need to log in
before you can comment on or make changes to this bug.
Description
•