Closed Bug 1574117 Opened 5 years ago Closed 5 years ago

[wpt-sync] Sync PR 18452 - Stop calling Promise.prototype.then() from StreamPromiseThen()

Categories

(Testing :: web-platform-tests, task, P4)

task

Tracking

(firefox70 fixed)

RESOLVED FIXED
mozilla70
Tracking Status
firefox70 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 18452 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/18452
Details from upstream follow.

Adam Rice <ricea@chromium.org> wrote:

Stop calling Promise.prototype.then() from StreamPromiseThen()

When on_fulfilled was null, StreamPromiseThen() used
v8::Promise::Catch(), which calls promise.then(), resulting in a call to
Promise.prototype.then which may not be set to the original value.

Use the two-argument form of v8::Promise::Then() instead, which doesn't
have the problem.

Also add tests to verify that ReadableStream tee() and pipeTo() do not
call Promise.prototype.then().

Bug: 992482
Change-Id: I5658f90df864785bfe6c54ae1bce37d7a2af6e0c
Reviewed-on: https://chromium-review.googlesource.com/1755627
WPT-Export-Revision: 636d45fc3f653ed1bf898c4a151d6f6328ed0057

Ran 5 tests and 20 subtests
OK     : 4
PASS   : 12
FAIL   : 8

New tests that have failures or other problems:
/streams/readable-streams/patched-global.any.html
    pipeTo() should not call Promise.prototype.then(): FAIL
/streams/readable-streams/patched-global.any.serviceworker.html
    pipeTo() should not call Promise.prototype.then(): FAIL
/streams/readable-streams/patched-global.any.sharedworker.html
    pipeTo() should not call Promise.prototype.then(): FAIL
/streams/readable-streams/patched-global.any.worker.html
    pipeTo() should not call Promise.prototype.then(): FAIL

Tests that are disabled for instability:
/streams/readable-streams/patched-global.any.js
Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/bd9eccf812dd
[wpt PR 18452] - Stop calling Promise.prototype.then() from StreamPromiseThen(), a=testonly
https://hg.mozilla.org/integration/mozilla-inbound/rev/9b112baf476c
[wpt PR 18452] - Update wpt metadata, a=testonly
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla70
You need to log in before you can comment on or make changes to this bug.