Commit 35b4bde8 authored by Benedikt Meurer's avatar Benedikt Meurer Committed by Commit Bot

[builtins] Fix typo in PromiseResolve fast-path.

The PromiseResolve builtin was missing it's fast-path for when we can
skip the "constructor" lookup due to a typo.

Bug: v8:7253
Change-Id: Icca033af5d4f7fe8b43ebf49c9315b4c80d52cbc
Reviewed-on: https://chromium-review.googlesource.com/955483Reviewed-by: 's avatarJaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51807}
parent 98e0bcfa
...@@ -1171,7 +1171,7 @@ TF_BUILTIN(PromiseResolve, PromiseBuiltinsAssembler) { ...@@ -1171,7 +1171,7 @@ TF_BUILTIN(PromiseResolve, PromiseBuiltinsAssembler) {
// intact, as that guards the lookup path for "constructor" on // intact, as that guards the lookup path for "constructor" on
// JSPromise instances which have the (initial) Promise.prototype. // JSPromise instances which have the (initial) Promise.prototype.
Node* const promise_prototype = Node* const promise_prototype =
LoadContextElement(native_context, Context::PROMISE_FUNCTION_INDEX); LoadContextElement(native_context, Context::PROMISE_PROTOTYPE_INDEX);
GotoIfNot(WordEqual(LoadMapPrototype(value_map), promise_prototype), GotoIfNot(WordEqual(LoadMapPrototype(value_map), promise_prototype),
&if_slow_constructor); &if_slow_constructor);
GotoIf(IsSpeciesProtectorCellInvalid(), &if_slow_constructor); GotoIf(IsSpeciesProtectorCellInvalid(), &if_slow_constructor);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment