[webkit-changes] [WebKit/WebKit] 6a9d7a: [GStreamer] Crash in CachedResourceStreamingClient...
Philippe Normand
noreply at github.com
Tue Jan 9 03:42:13 PST 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 6a9d7a164705ebaf78a158be71f97a5f520f9655
https://github.com/WebKit/WebKit/commit/6a9d7a164705ebaf78a158be71f97a5f520f9655
Author: Philippe Normand <philn at igalia.com>
Date: 2024-01-09 (Tue, 09 Jan 2024)
Changed paths:
M LayoutTests/platform/glib/TestExpectations
M Source/WTF/wtf/PlatformGTK.cmake
M Source/WTF/wtf/PlatformWPE.cmake
A Source/WTF/wtf/glib/GThreadSafeWeakPtr.h
M Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp
M Tools/TestWebKitAPI/Tests/WTF/glib/GWeakPtr.cpp
Log Message:
-----------
[GStreamer] Crash in CachedResourceStreamingClient::dataReceived
https://bugs.webkit.org/show_bug.cgi?id=266973
Reviewed by Michael Catanzaro, Carlos Garcia Campos and Xabier Rodriguez-Calvar.
Store the WebKitWebSrc pointer as a weak reference in the CachedResourceStreamingClient. Using a
const raw pointer was not sufficient, because nothing prevented other code to dispose the element,
thus making the pointer point to garbage. We can't use a strong reference because it would introduce
a reference cycle between WebKitWebSrc and the CachedResourceStreamingClient.
* Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
(webKitWebSrcMakeRequest):
(CachedResourceStreamingClient::CachedResourceStreamingClient):
(CachedResourceStreamingClient::~CachedResourceStreamingClient):
(CachedResourceStreamingClient::checkUpdateBlocksize):
(CachedResourceStreamingClient::responseReceived):
(CachedResourceStreamingClient::dataReceived):
(CachedResourceStreamingClient::accessControlCheckFailed):
(CachedResourceStreamingClient::loadFailed):
(CachedResourceStreamingClient::loadFinished):
Canonical link: https://commits.webkit.org/272807@main
More information about the webkit-changes
mailing list