Open Bug 1860083 Opened 8 months ago Updated 8 months ago

WebIDL bindings code to convert a WebIDL Promise should create a new Promise and resolve it instead of calling Promise::Resolve

Categories

(Core :: DOM: Bindings (WebIDL), defect, P3)

defect

Tracking

()

ASSIGNED

People

(Reporter: peterv, Assigned: peterv)

References

(Blocks 1 open bug)

Details

The spec says to do:

  1. Let promiseCapability be ? NewPromiseCapability(%Promise%).
  2. Perform ? Call(promiseCapability.[[Resolve]], undefined, « V »).
  3. Return promiseCapability.

The generated binding code calls Promise::Resolve, which is the equivalent of ECMAScript's Promise.resolve. There are subtle differences between the two, because calling Promise.resolve with a promise as its argument will just return the existing promise.

Blocks: 1856103
Depends on: 1863277
You need to log in before you can comment on or make changes to this bug.