Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: c9df83b2f0da3b9cbdafc9ac3afc99b0ad728310
      
https://github.com/WebKit/WebKit/commit/c9df83b2f0da3b9cbdafc9ac3afc99b0ad728310
  Author: Youenn Fablet <[email protected]>
  Date:   2026-07-29 (Wed, 29 Jul 2026)

  Changed paths:
    M Source/WebCore/platform/network/cf/FormDataStreamCFNet.mm

  Log Message:
  -----------
  pendingStreamSchedule should not allow to call CFReadStreamSignalEvent before 
pendingStreamOpen
rdar://183422054
https://bugs.webkit.org/show_bug.cgi?id=320454

Reviewed by Chris Dumez.

The contract is to call CFReadStreamSignalEvent when the CFReadStream is opened.
But pendingStreamSchedule can be called before pendingStreamOpen.

We are now registering the data available handler (that can call 
CFReadStreamSignalEvent) in pendingStreamCanRead.
At that point, we know it makes sense to register this handler since CFNetwork 
is interested in data.

We register the data available handler at the first call of 
pendingStreamCanRead, based on context isHTTP2OrLater.
We also move the HTTP1.1 check there since it will fail the load immediately 
afterwards.

* Source/WebCore/platform/network/cf/FormDataStreamCFNet.mm:
(WebCore::pendingStreamOpen):
(WebCore::pendingStreamCanRead):
(WebCore::pendingStreamSchedule):
(WebCore::createHTTPBodyCFReadStream):
(WebCore::pendingStreamUnschedule): Deleted.

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



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

Reply via email to