Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 58e404642c059a7d0d6e055b620a8318a94457d7
      
https://github.com/WebKit/WebKit/commit/58e404642c059a7d0d6e055b620a8318a94457d7
  Author: Jer Noble <[email protected]>
  Date:   2026-02-23 (Mon, 23 Feb 2026)

  Changed paths:
    M Source/WebCore/Modules/streams/ReadableStreamDefaultReader.cpp

  Log Message:
  -----------
  CRASH in WebCore::ReadableStream::state() const
rdar://170652029
https://bugs.webkit.org/show_bug.cgi?id=308309

Reviewed by Youenn Fablet.

The Streams specification states for the releaseLock() method
that the method should return early if `this.[[stream]]` is
undefined, but it was possible for releaseLock() to call
genericRelease() if m_stream was null, if m_internalDefaultReader
is also null.

Return early from releaseLock() if m_stream is null, and
due to the law of unintended consequences, also return early
from genericRelease() if m_stream is null, as well as from
genericCancel() and setup(), which have similar issues.

* Source/WebCore/Modules/streams/ReadableStreamDefaultReader.cpp:
(WebCore::ReadableStreamDefaultReader::releaseLock):
(WebCore::ReadableStreamDefaultReader::setup):
(WebCore::ReadableStreamDefaultReader::genericRelease):

Canonical link: https://commits.webkit.org/308072@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to