Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 1c0b52378f3ab81f863c92762edcecfaf5aa5e1a
https://github.com/WebKit/WebKit/commit/1c0b52378f3ab81f863c92762edcecfaf5aa5e1a
Author: Youenn Fablet <[email protected]>
Date: 2026-03-10 (Tue, 10 Mar 2026)
Changed paths:
M Source/WebCore/Modules/streams/ReadableByteStreamController.cpp
M Source/WebCore/Modules/streams/ReadableByteStreamController.h
M Source/WebCore/bindings/js/JSDOMPromise.cpp
M Source/WebCore/bindings/js/JSDOMPromise.h
Log Message:
-----------
ReadableByteStreamController should be tied to the promise it is waiting to
be settled to prevent GC
rdar://171376465
https://bugs.webkit.org/show_bug.cgi?id=309560
Reviewed by Chris Dumez.
When readable stream controller is waiting for a promise (start, pull or cancel
callback promise), there is a risk of GC.
We make sure that the controller JS wrapper is tied to the JS function callback
given to the promise so that we tie the promise and controller for GC.
This ensures that we wait for the promise to be resolved to let GC collect the
controller (and stream and reader).
Covered by
imported/w3c/web-platform-tests/streams/readable-byte-streams/respond-after-enqueue.any.worker.html
when run with collectContinuously equal to true.
Canonical link: https://commits.webkit.org/308984@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications