summaryrefslogtreecommitdiff
path: root/ext/web/06_streams.js
diff options
context:
space:
mode:
authorMattias Buelens <649348+MattiasBuelens@users.noreply.github.com>2024-05-14 01:34:25 +0200
committerGitHub <noreply@github.com>2024-05-13 23:34:25 +0000
commit9338770a709b3f0bc79c9b3d00e5f522857a5c5c (patch)
tree7d530879d8db68e927ddd3bd9711dab43be8e8a5 /ext/web/06_streams.js
parentf2dc3f9a94444b1a5a40570be09c7f64903d27cb (diff)
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.
Diffstat (limited to 'ext/web/06_streams.js')
-rw-r--r--ext/web/06_streams.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/web/06_streams.js b/ext/web/06_streams.js
index e0e3ccbbe..9c2a05980 100644
--- a/ext/web/06_streams.js
+++ b/ext/web/06_streams.js
@@ -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 }),
);
},