Resolves "New Tab" bug after web content process jettison
This commit is contained in:
@@ -10,7 +10,11 @@ import WebKit
|
||||
extension BrowserViewController: WKNavigationDelegate, WKUIDelegate
|
||||
{
|
||||
func webView(_ webView: WKWebView, didStartProvisionalNavigation navigation: WKNavigation!) {
|
||||
currentTab.loadError = nil
|
||||
if let tab = tabController.tab(forWebView: webView) {
|
||||
// We're alive!
|
||||
tab.contentProcessTerminated = false
|
||||
tab.loadError = nil
|
||||
}
|
||||
|
||||
// Check to make sure we have connected to the web content process
|
||||
if !currentTab.bridge.webContentProcessConnected {
|
||||
@@ -120,6 +124,10 @@ extension BrowserViewController: WKNavigationDelegate, WKUIDelegate
|
||||
}
|
||||
}
|
||||
|
||||
func webViewWebContentProcessDidTerminate(_ webView: WKWebView) {
|
||||
tabController.tab(forWebView: webView)?.contentProcessTerminated = true
|
||||
}
|
||||
|
||||
// MARK: WKUIDelegate
|
||||
|
||||
func webView(_ webView: WKWebView, createWebViewWith configuration: WKWebViewConfiguration, for navigationAction: WKNavigationAction, windowFeatures: WKWindowFeatures) -> WKWebView?
|
||||
|
||||
Reference in New Issue
Block a user