Optimize the case when "then" property is Promise.prototype.then

NEW
Unassigned

Status

()

Core
JavaScript: Standard Library
P3
minor
29 days ago
24 days ago

People

(Reporter: arai, Unassigned)

Tracking

(Blocks: 1 bug)

Trunk
Points:
---

Firefox Tracking Flags

(firefox58 affected)

Details

(Reporter)

Description

29 days ago
ResolvePromiseInternal gets "then" property from the thenable object, and passes the value to job, but in most case the "then" property is Promise.prototype.then.

I think, we could skip the following:
  * get "then" property in some case (if the shape is same every time, see also bug 1410695)
  * store "then" callable object to slot (this can avoid post barrier)
  * call on the "then" function with Call+CallArgs
(Reporter)

Comment 1

29 days ago
(In reply to Tooru Fujisawa [:arai] from comment #0)
> ResolvePromiseInternal gets "then" property from the thenable object, and
> passes the value to job, but in most case the "then" property is
> Promise.prototype.then.

if "then" property exists.
(sorry I forgot to think about other cases)
(Reporter)

Updated

29 days ago
Severity: normal → minor
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.