Changeset 192792 in webkit
- Timestamp:
- Nov 30, 2015 1:39:49 AM (8 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r192786 r192792 1 2015-11-30 Carlos Garcia Campos <cgarcia@igalia.com> 2 3 [GTK] UI process crash when the screensaver DBus proxy is being created while the web view is destroyed 4 https://bugs.webkit.org/show_bug.cgi?id=151653 5 6 Reviewed by Martin Robinson. 7 8 We correctly cancel the proxy creation, but when the async ready 9 callback is called, the view could be destroyed already. In that 10 case g_dbus_proxy_new_for_bus_finish() will return nullptr and 11 fail with cancelled error, but we are using the passed web view 12 without checking first if the creation failed or not. 13 14 * UIProcess/API/gtk/WebKitWebViewBase.cpp: 15 (screenSaverProxyCreatedCallback): 16 1 17 2015-11-28 Tim Horton <timothy_horton@apple.com> 2 18 -
trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp
r192782 r192792 1171 1171 static void screenSaverProxyCreatedCallback(GObject*, GAsyncResult* result, WebKitWebViewBase* webViewBase) 1172 1172 { 1173 WebKitWebViewBasePrivate* priv = webViewBase->priv; 1174 priv->screenSaverProxy = adoptGRef(g_dbus_proxy_new_for_bus_finish(result, nullptr)); 1175 if (!priv->screenSaverProxy) 1176 return; 1177 1173 // WebKitWebViewBase cancels the proxy creation on dispose, which means this could be called 1174 // after the web view has been destroyed and g_dbus_proxy_new_for_bus_finish will return nullptr. 1175 // So, make sure we don't use the web view unless we have a valid proxy. 1176 // See https://bugs.webkit.org/show_bug.cgi?id=151653. 1177 GRefPtr<GDBusProxy> proxy = adoptGRef(g_dbus_proxy_new_for_bus_finish(result, nullptr)); 1178 if (!proxy) 1179 return; 1180 1181 webViewBase->priv->screenSaverProxy = proxy; 1178 1182 webkitWebViewBaseSendInhibitMessageToScreenSaver(webViewBase); 1179 1183 }
Note: See TracChangeset
for help on using the changeset viewer.