Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 898e897b19bfe645292b81d50d62996ab4d9dff5
https://github.com/WebKit/WebKit/commit/898e897b19bfe645292b81d50d62996ab4d9dff5
Author: Youenn Fablet <[email protected]>
Date: 2025-12-22 (Mon, 22 Dec 2025)
Changed paths:
M LayoutTests/platform/mac/TestExpectations
M Source/WebCore/Modules/streams/ReadableStream.cpp
M Source/WebCore/Modules/streams/ReadableStream.h
M Source/WebCore/Modules/streams/ReadableStream.idl
M Source/WebCore/Modules/streams/ReadableStreamBYOBReader.cpp
M Source/WebCore/Modules/streams/ReadableStreamDefaultReader.cpp
M Source/WebCore/Modules/streams/StreamTeeUtilities.cpp
Log Message:
-----------
Teed byte streams can be GCed even though their parent stream can still
fulfil read requests
rdar://166562238
https://bugs.webkit.org/show_bug.cgi?id=304253
Reviewed by Chris Dumez.
We have an issue that leads to GC of streams in case of byteStreamTee.
If the stream gets GCed, the readable stream reader will also be GCed and the
read promises will not get fulfilled.
A reader of a teed stream should not be GCed if the source stream is active.
To fix that issue, whenever a source stream is visited by GC, we are marking
its teed streams as reachable from opaque roots if the source stream is
readable.
We make sure to use a lock for the weak pointers and nullify the weak pointer
before the corresponding stream gets destroyed.
Covered by reenabled tests.
Canonical link: https://commits.webkit.org/304858@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications