Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 397f9236f48ee41fb71362ef742999fb61b8ef7d
https://github.com/WebKit/WebKit/commit/397f9236f48ee41fb71362ef742999fb61b8ef7d
Author: Youenn Fablet <[email protected]>
Date: 2026-01-09 (Fri, 09 Jan 2026)
Changed paths:
M Source/WebCore/Modules/streams/ReadableStreamDefaultReader.cpp
M Source/WebCore/Modules/streams/StreamPipeToUtilities.cpp
M Source/WebCore/bindings/js/InternalWritableStreamWriter.cpp
M Source/WebCore/bindings/js/InternalWritableStreamWriter.h
M Source/WebCore/bindings/js/JSDOMPromise.cpp
Log Message:
-----------
DOMPromise::whenPromiseIsSettled should deallocate its callback as soon as
called
rdar://167782759
https://bugs.webkit.org/show_bug.cgi?id=305130
Reviewed by Chris Dumez.
DOMPromise::whenPromiseIsSettled callback was previously deallocated when its
promise gets deallocated.
This might be late and might also create ref cycle.
To prevent this, we make sure the callback is deallocated right after it is
called in DOMPromise::whenPromiseIsSettled.
We also do the same in ReadableStreamDefaultReader::onClosedPromiseResolution
to update StreamPipeToState.
This triggers the need to ensure that StreamPipeToState stays allocated until
the writer ready promise callbacks are called in case of rejection.
We update InternalWritableStreamWriter::whenReady so that the callback is
always called and update StreamPipeToState like we have done for reader closing.
Covered by existing tests.
Canonical link: https://commits.webkit.org/305353@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications