Commit e1bfdae8 authored by Shu-yu Guo's avatar Shu-yu Guo Committed by Commit Bot

Check for null or undefined when getting methods in AsyncFromSyncIterator

Both the .return and .throw methods are delegated to the underlying sync
iterator. These methods are retrieved using GetMethod [1], which checks
for either null or undefined instead of only undefined.

[1] https://tc39.es/ecma262/#sec-getmethod

Bug: v8:10395
Change-Id: Ide8db4270d48783da6fd1d45a5b01f2858e2828c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2258667
Auto-Submit: Shu-yu Guo <syg@chromium.org>
Reviewed-by: 's avatarMarja Hölttä <marja@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68493}
parent 6f296e0b
......@@ -127,7 +127,7 @@ void AsyncFromSyncBuiltinsAssembler::Generate_AsyncFromSyncIteratorMethod(
if (if_method_undefined) {
Label if_isnotundefined(this);
GotoIfNot(IsUndefined(method), &if_isnotundefined);
GotoIfNot(IsNullOrUndefined(method), &if_isnotundefined);
if_method_undefined(native_context, promise, &reject_promise);
BIND(&if_isnotundefined);
......
......@@ -536,10 +536,6 @@
# https://bugs.chromium.org/p/v8/issues/detail?id=10383
'built-ins/RegExp/prototype/Symbol.replace/fn-invoke-args-empty-result': [FAIL],
# https://bugs.chromium.org/p/v8/issues/detail?id=10395
'built-ins/AsyncFromSyncIteratorPrototype/return/return-null': [FAIL],
'built-ins/AsyncFromSyncIteratorPrototype/throw/throw-null': [FAIL],
# http://crbug/v8/10449
'built-ins/Atomics/waitAsync/bad-range': [FAIL],
'built-ins/Atomics/waitAsync/bigint/bad-range': [FAIL],
......
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