Open Bug 1133522 Opened 11 years ago Updated 3 years ago

Promise.resolve and Promise.reject should throw if Type(this) is not Object

Categories

(Core :: DOM: Core & HTML, defect, P5)

38 Branch
x86
macOS
defect

Tracking

()

UNCONFIRMED

People

(Reporter: andyearnshaw, Unassigned)

Details

(Whiteboard: DUPEME)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.53 Safari/537.36 Steps to reproduce: Execute this in the console: r = Promise.resolve; r(); Actual results: No error is thrown. Expected results: According to the latest ECMAScript spec draft, the steps for both Promise.reject and Promise.resolve start with the following: 1. Let C be the this value. 2. If Type(C) is not Object, throw a TypeError exception.
Component: JavaScript: Standard Library → DOM
Yes, we don't support subclassing of Promises yet....
Whiteboard: DUPEME
https://bugzilla.mozilla.org/show_bug.cgi?id=1472046 Move all DOM bugs that haven't been updated in more than 3 years and has no one currently assigned to P5. If you have questions, please contact :mdaly.
Priority: -- → P5
Component: DOM → DOM: Core & HTML
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.