Changeset 244640 in webkit
- Timestamp:
- Apr 25, 2019 12:47:25 AM (5 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r244635 r244640 1 2019-04-25 Philippe Normand <pnormand@igalia.com> 2 3 [REGRESSION(r243197)][GStreamer] http/tests/media/clearkey/collect-webkit-media-session.html hits an ASSERT 4 https://bugs.webkit.org/show_bug.cgi?id=197230 5 6 Reviewed by Xabier Rodriguez-Calvar. 7 8 Perform the resource loader disposal and destruction from the main 9 thread. Also ensure there's no circular reference between the 10 CachedResourceStreamingClient and WebKitWebSrc when disposing of 11 the private WebKitWebSrc storage. 12 13 * platform/graphics/gstreamer/MainThreadNotifier.h: 14 * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp: 15 (_WebKitWebSrcPrivate::~_WebKitWebSrcPrivate): 16 (webkit_web_src_class_init): 17 (webKitWebSrcDispose): 18 (webKitWebSrcCloseSession): 19 (webKitWebSrcFinalize): Deleted. 20 1 21 2019-04-24 Carlos Garcia Campos <cgarcia@igalia.com> 2 22 -
trunk/Source/WebCore/platform/graphics/gstreamer/MainThreadNotifier.h
r243058 r244640 40 40 ASSERT(!m_isValid.load()); 41 41 } 42 43 bool isValid() const { return m_isValid.load(); } 42 44 43 45 template<typename F> -
trunk/Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp
r244109 r244640 47 47 const HashSet<RefPtr<WebCore::SecurityOrigin>>& securityOrigins() const { return m_origins; } 48 48 49 void setSourceElement(WebKitWebSrc* src) { m_src = GST_ELEMENT_CAST(src); } 50 49 51 private: 50 52 void checkUpdateBlocksize(uint64_t bytesRead); … … 74 76 Start = 1 << 0, 75 77 Stop = 1 << 1, 78 Dispose = 1 << 2, 76 79 }; 77 80 78 81 #define WEBKIT_WEB_SRC_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE((obj), WEBKIT_TYPE_WEB_SRC, WebKitWebSrcPrivate)) 79 82 struct _WebKitWebSrcPrivate { 83 ~_WebKitWebSrcPrivate() 84 { 85 if (notifier && notifier->isValid()) { 86 notifier->notifyAndWait(MainThreadSourceNotification::Dispose, [&] { 87 if (resource) { 88 auto* client = static_cast<CachedResourceStreamingClient*>(resource->client()); 89 if (client) 90 client->setSourceElement(nullptr); 91 92 resource->setClient(nullptr); 93 } 94 loader = nullptr; 95 }); 96 notifier->invalidate(); 97 notifier = nullptr; 98 } 99 } 100 80 101 CString originalURI; 81 102 CString redirectedURI; … … 132 153 133 154 static void webKitWebSrcDispose(GObject*); 134 static void webKitWebSrcFinalize(GObject*);135 155 static void webKitWebSrcSetProperty(GObject*, guint propertyID, const GValue*, GParamSpec*); 136 156 static void webKitWebSrcGetProperty(GObject*, guint propertyID, GValue*, GParamSpec*); … … 159 179 160 180 oklass->dispose = webKitWebSrcDispose; 161 oklass->finalize = webKitWebSrcFinalize;162 181 oklass->set_property = webKitWebSrcSetProperty; 163 182 oklass->get_property = webKitWebSrcGetProperty; … … 246 265 { 247 266 WebKitWebSrcPrivate* priv = WEBKIT_WEB_SRC(object)->priv; 248 if (priv->notifier) { 249 priv->notifier->invalidate(); 250 priv->notifier = nullptr; 251 } 267 268 priv->~WebKitWebSrcPrivate(); 252 269 253 270 GST_CALL_PARENT(G_OBJECT_CLASS, dispose, (object)); 254 }255 256 static void webKitWebSrcFinalize(GObject* object)257 {258 WebKitWebSrcPrivate* priv = WEBKIT_WEB_SRC(object)->priv;259 260 priv->~WebKitWebSrcPrivate();261 262 GST_CALL_PARENT(G_OBJECT_CLASS, finalize, (object));263 271 } 264 272
Note: See TracChangeset
for help on using the changeset viewer.