Title: [203230] trunk/Source/WebKit2
- Revision
- 203230
- Author
- [email protected]
- Date
- 2016-07-14 11:33:22 -0700 (Thu, 14 Jul 2016)
Log Message
Possible crash under NavigationState::NavigationClient::processDidCrash()
https://bugs.webkit.org/show_bug.cgi?id=159773
<rdar://problem/19814215>
Reviewed by Anders Carlsson.
Add a m_navigationState.m_navigationDelegateMethods.webViewWebProcessDidCrash before
trying to call it to avoid crashing if the client does not implement it.
At the beginning of the method, we abort early only if both webViewWebContentProcessDidTerminate
and webViewWebProcessDidCrash are implemented. However, if webViewWebContentProcessDidTerminate
implemented but not webViewWebProcessDidCrash we can end up crashing as we fail to check later
on before trying to call it.
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::NavigationClient::processDidCrash):
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (203229 => 203230)
--- trunk/Source/WebKit2/ChangeLog 2016-07-14 18:18:55 UTC (rev 203229)
+++ trunk/Source/WebKit2/ChangeLog 2016-07-14 18:33:22 UTC (rev 203230)
@@ -1,3 +1,22 @@
+2016-07-14 Chris Dumez <[email protected]>
+
+ Possible crash under NavigationState::NavigationClient::processDidCrash()
+ https://bugs.webkit.org/show_bug.cgi?id=159773
+ <rdar://problem/19814215>
+
+ Reviewed by Anders Carlsson.
+
+ Add a m_navigationState.m_navigationDelegateMethods.webViewWebProcessDidCrash before
+ trying to call it to avoid crashing if the client does not implement it.
+
+ At the beginning of the method, we abort early only if both webViewWebContentProcessDidTerminate
+ and webViewWebProcessDidCrash are implemented. However, if webViewWebContentProcessDidTerminate
+ implemented but not webViewWebProcessDidCrash we can end up crashing as we fail to check later
+ on before trying to call it.
+
+ * UIProcess/Cocoa/NavigationState.mm:
+ (WebKit::NavigationState::NavigationClient::processDidCrash):
+
2016-07-14 Csaba Osztrogonác <[email protected]>
Fix the DatabaseProcess build with disabled IDB
Modified: trunk/Source/WebKit2/UIProcess/Cocoa/NavigationState.mm (203229 => 203230)
--- trunk/Source/WebKit2/UIProcess/Cocoa/NavigationState.mm 2016-07-14 18:18:55 UTC (rev 203229)
+++ trunk/Source/WebKit2/UIProcess/Cocoa/NavigationState.mm 2016-07-14 18:33:22 UTC (rev 203230)
@@ -685,7 +685,8 @@
return;
}
- [static_cast<id <WKNavigationDelegatePrivate>>(navigationDelegate.get()) _webViewWebProcessDidCrash:m_navigationState.m_webView];
+ if (m_navigationState.m_navigationDelegateMethods.webViewWebProcessDidCrash)
+ [static_cast<id <WKNavigationDelegatePrivate>>(navigationDelegate.get()) _webViewWebProcessDidCrash:m_navigationState.m_webView];
}
void NavigationState::NavigationClient::processDidBecomeResponsive(WebKit::WebPageProxy& page)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes