mirror of
https://github.com/denoland/deno.git
synced 2025-09-26 12:19:12 +00:00
fix(ext/web): update ongoing promise in async iterator return()
method (#23642)
See https://github.com/whatwg/webidl/pull/1387 for context. There are new WPT tests for this change in https://github.com/web-platform-tests/wpt/pull/44456. They pass on my local machine, but I'm not sure if I should update the WPT submodule for all of Deno as part of this PR? Fixes #22389 --------- Co-authored-by: Asher Gomez <ashersaupingomez@gmail.
This commit is contained in:
parent
f2dc3f9a94
commit
9338770a70
3 changed files with 52 additions and 11 deletions
|
@ -4964,11 +4964,11 @@ const readableStreamAsyncIteratorPrototype = ObjectSetPrototypeOf({
|
|||
return PromiseResolve({ value: undefined, done: true });
|
||||
};
|
||||
|
||||
const returnPromise = reader[_iteratorNext]
|
||||
reader[_iteratorNext] = reader[_iteratorNext]
|
||||
? PromisePrototypeThen(reader[_iteratorNext], returnSteps, returnSteps)
|
||||
: returnSteps();
|
||||
return PromisePrototypeThen(
|
||||
returnPromise,
|
||||
reader[_iteratorNext],
|
||||
() => ({ value: arg, done: true }),
|
||||
);
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue