Skip to content

Commit 03488ca

Browse files
MattiasBuelensbartlomieju
authored andcommitted
fix(ext/web): update ongoing promise in async iterator return() method (#23642)
See whatwg/webidl#1387 for context. There are new WPT tests for this change in web-platform-tests/wpt#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.
1 parent 420023c commit 03488ca

3 files changed

Lines changed: 52 additions & 11 deletions

File tree

ext/web/06_streams.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4964,11 +4964,11 @@ const readableStreamAsyncIteratorPrototype = ObjectSetPrototypeOf({
49644964
return PromiseResolve({ value: undefined, done: true });
49654965
};
49664966

4967-
const returnPromise = reader[_iteratorNext]
4967+
reader[_iteratorNext] = reader[_iteratorNext]
49684968
? PromisePrototypeThen(reader[_iteratorNext], returnSteps, returnSteps)
49694969
: returnSteps();
49704970
return PromisePrototypeThen(
4971-
returnPromise,
4971+
reader[_iteratorNext],
49724972
() => ({ value: arg, done: true }),
49734973
);
49744974
},

tests/wpt/runner/expectation.json

Lines changed: 49 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2795,7 +2795,26 @@
27952795
"XSLTProcessor interface: operation reset()",
27962796
"Window interface: attribute event",
27972797
"idl_test setup",
2798-
"ShadowRoot interface: attribute clonable"
2798+
"ShadowRoot interface: attribute clonable",
2799+
"Document interface: operation prepend((Node or TrustedScript or DOMString)...)",
2800+
"Document interface: operation append((Node or TrustedScript or DOMString)...)",
2801+
"Document interface: operation replaceChildren((Node or TrustedScript or DOMString)...)",
2802+
"DocumentType interface: operation before((Node or TrustedScript or DOMString)...)",
2803+
"DocumentType interface: operation after((Node or TrustedScript or DOMString)...)",
2804+
"DocumentType interface: operation replaceWith((Node or TrustedScript or DOMString)...)",
2805+
"DocumentFragment interface: operation prepend((Node or TrustedScript or DOMString)...)",
2806+
"DocumentFragment interface: operation append((Node or TrustedScript or DOMString)...)",
2807+
"DocumentFragment interface: operation replaceChildren((Node or TrustedScript or DOMString)...)",
2808+
"ShadowRoot interface: attribute serializable",
2809+
"Element interface: operation prepend((Node or TrustedScript or DOMString)...)",
2810+
"Element interface: operation append((Node or TrustedScript or DOMString)...)",
2811+
"Element interface: operation replaceChildren((Node or TrustedScript or DOMString)...)",
2812+
"Element interface: operation before((Node or TrustedScript or DOMString)...)",
2813+
"Element interface: operation after((Node or TrustedScript or DOMString)...)",
2814+
"Element interface: operation replaceWith((Node or TrustedScript or DOMString)...)",
2815+
"CharacterData interface: operation before((Node or TrustedScript or DOMString)...)",
2816+
"CharacterData interface: operation after((Node or TrustedScript or DOMString)...)",
2817+
"CharacterData interface: operation replaceWith((Node or TrustedScript or DOMString)...)"
27992818
],
28002819
"idlharness.window.html?include=Node": [
28012820
"Node interface: existence and properties of interface object",
@@ -3296,8 +3315,18 @@
32963315
"valueOf.any.html": true,
32973316
"valueOf.any.worker.html": true
32983317
},
3299-
"idlharness.any.html": true,
3300-
"idlharness.any.worker.html": true,
3318+
"idlharness.any.html": [
3319+
"Memory interface: operation toFixedLengthBuffer()",
3320+
"Memory interface: operation toResizableBuffer()",
3321+
"Memory interface: [object WebAssembly.Memory] must inherit property \"toFixedLengthBuffer()\" with the proper type",
3322+
"Memory interface: [object WebAssembly.Memory] must inherit property \"toResizableBuffer()\" with the proper type"
3323+
],
3324+
"idlharness.any.worker.html": [
3325+
"Memory interface: operation toFixedLengthBuffer()",
3326+
"Memory interface: operation toResizableBuffer()",
3327+
"Memory interface: [object WebAssembly.Memory] must inherit property \"toFixedLengthBuffer()\" with the proper type",
3328+
"Memory interface: [object WebAssembly.Memory] must inherit property \"toResizableBuffer()\" with the proper type"
3329+
],
33013330
"instance": {
33023331
"constructor-bad-imports.any.html": true,
33033332
"constructor-bad-imports.any.worker.html": true,
@@ -4512,7 +4541,15 @@
45124541
"<a>: Setting <http://example.net>.hash = ' ' Trailing space should be encoded",
45134542
"<area>: Setting <http://example.net>.hash = ' ' Trailing space should be encoded",
45144543
"<a>: Setting <http://example.net>.hash = '\u0000' Trailing C0 control should be encoded",
4515-
"<area>: Setting <http://example.net>.hash = '\u0000' Trailing C0 control should be encoded"
4544+
"<area>: Setting <http://example.net>.hash = '\u0000' Trailing C0 control should be encoded",
4545+
"<a>: Setting <http://example.net/path>.host = 'example.com?stuff:8080' Stuff after a ? delimiter is ignored, trailing 'port'",
4546+
"<area>: Setting <http://example.net/path>.host = 'example.com?stuff:8080' Stuff after a ? delimiter is ignored, trailing 'port'",
4547+
"<a>: Setting <http://example.net:8080>.host = 'example.com:invalid' Anything other than ASCII digit stops the port parser in a setter but is not an error",
4548+
"<area>: Setting <http://example.net:8080>.host = 'example.com:invalid' Anything other than ASCII digit stops the port parser in a setter but is not an error",
4549+
"<a>: Setting <http://example.net:8080/test>.host = '[::1]:invalid' Anything other than ASCII digit stops the port parser in a setter but is not an error",
4550+
"<area>: Setting <http://example.net:8080/test>.host = '[::1]:invalid' Anything other than ASCII digit stops the port parser in a setter but is not an error",
4551+
"<a>: Setting <http://example.net:8080/test>.host = '[::1]' IPv6 without port",
4552+
"<area>: Setting <http://example.net:8080/test>.host = '[::1]' IPv6 without port"
45164553
],
45174554
"url-setters-a-area.window.html?include=file": [
45184555
"<a>: Setting <file://localhost/>.protocol = 'http' Can’t switch from file URL with no host",
@@ -4599,7 +4636,9 @@
45994636
"URL: Setting <non-spec:/>.pathname = '//p'",
46004637
"URL: Setting <non-spec:/.//>.pathname = 'p' Drop /. from path",
46014638
"URL: Setting <data:space ?query#fragment>.search = '' Do not drop trailing spaces from non-trailing opaque paths",
4602-
"URL: Setting <sc:space ?query#fragment>.search = ''"
4639+
"URL: Setting <sc:space ?query#fragment>.search = ''",
4640+
"URL: Setting <http://example.net:8080>.host = 'example.com:invalid' Anything other than ASCII digit stops the port parser in a setter but is not an error",
4641+
"URL: Setting <http://example.net:8080/test>.host = '[::1]:invalid' Anything other than ASCII digit stops the port parser in a setter but is not an error"
46034642
],
46044643
"url-setters.any.html?include=file": [
46054644
"URL: Setting <file://monkey/>.pathname = '\\\\' File URLs and (back)slashes",
@@ -4621,7 +4660,9 @@
46214660
"URL: Setting <non-spec:/>.pathname = '//p'",
46224661
"URL: Setting <non-spec:/.//>.pathname = 'p' Drop /. from path",
46234662
"URL: Setting <data:space ?query#fragment>.search = '' Do not drop trailing spaces from non-trailing opaque paths",
4624-
"URL: Setting <sc:space ?query#fragment>.search = ''"
4663+
"URL: Setting <sc:space ?query#fragment>.search = ''",
4664+
"URL: Setting <http://example.net:8080>.host = 'example.com:invalid' Anything other than ASCII digit stops the port parser in a setter but is not an error",
4665+
"URL: Setting <http://example.net:8080/test>.host = '[::1]:invalid' Anything other than ASCII digit stops the port parser in a setter but is not an error"
46254666
],
46264667
"url-setters.any.worker.html?include=file": [
46274668
"URL: Setting <file://monkey/>.pathname = '\\\\' File URLs and (back)slashes",
@@ -6603,8 +6644,8 @@
66036644
],
66046645
"forbidden-method.any.html": true,
66056646
"forbidden-method.any.worker.html": true,
6606-
"request-bad-port.any.html": false,
6607-
"request-bad-port.any.worker.html": false,
6647+
"request-bad-port.any.html": true,
6648+
"request-bad-port.any.worker.html": true,
66086649
"request-cache-default-conditional.any.html": true,
66096650
"request-cache-default-conditional.any.worker.html": true,
66106651
"request-cache-default.any.html": [

tests/wpt/suite

Submodule suite updated 1463 files

0 commit comments

Comments
 (0)