Closed Bug 1079090 Opened 5 years ago Closed 5 years ago

Coerce the argument passed to Object.getPrototypeOf using ToObject

Categories

(Core :: JavaScript: Standard Library, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla35

People

(Reporter: 446240525, Assigned: 446240525)

References

Details

(Keywords: dev-doc-complete, Whiteboard: [DocArea=JS])

Attachments

(1 file)

js> Object.getPrototypeOf("foo")
TypeError: "foo" is not an object
// should return `String.prototype` in ES6
Attachment #8500874 - Flags: review?(till)
Comment on attachment 8500874 [details] [diff] [review]
bug-1079090.patch

Review of attachment 8500874 [details] [diff] [review]:
-----------------------------------------------------------------

Nice!
Attachment #8500874 - Flags: review?(till) → review+
https://hg.mozilla.org/mozilla-central/rev/55b7368ee7f8
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla35
You need to log in before you can comment on or make changes to this bug.