Title: [160512] trunk/Source/WebKit2
Revision
160512
Author
[email protected]
Date
2013-12-12 15:49:22 -0800 (Thu, 12 Dec 2013)

Log Message

[Cocoa] Let the load delegate know when the Web process crashes
https://bugs.webkit.org/show_bug.cgi?id=125660

Reviewed by Sam Weinig.

* UIProcess/API/Cocoa/WKBrowsingContextController.mm:
(processDidCrash):  Implemented this WKPageLoaderClient callback by calling the load
delegate.
(setUpPageLoaderClient): Set the above callback in the client structure
* UIProcess/API/Cocoa/WKBrowsingContextLoadDelegatePrivate.h: Declare new delegate method.

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (160511 => 160512)


--- trunk/Source/WebKit2/ChangeLog	2013-12-12 23:46:36 UTC (rev 160511)
+++ trunk/Source/WebKit2/ChangeLog	2013-12-12 23:49:22 UTC (rev 160512)
@@ -1,3 +1,16 @@
+2013-12-12  Dan Bernstein  <[email protected]>
+
+        [Cocoa] Let the load delegate know when the Web process crashes
+        https://bugs.webkit.org/show_bug.cgi?id=125660
+
+        Reviewed by Sam Weinig.
+
+        * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
+        (processDidCrash):  Implemented this WKPageLoaderClient callback by calling the load
+        delegate.
+        (setUpPageLoaderClient): Set the above callback in the client structure
+        * UIProcess/API/Cocoa/WKBrowsingContextLoadDelegatePrivate.h: Declare new delegate method.
+
 2013-12-12  Anders Carlsson  <[email protected]>
 
         Move MessageSender to Platform/IPC.

Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKBrowsingContextController.mm (160511 => 160512)


--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKBrowsingContextController.mm	2013-12-12 23:46:36 UTC (rev 160511)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKBrowsingContextController.mm	2013-12-12 23:49:22 UTC (rev 160512)
@@ -512,6 +512,15 @@
     [loadDelegate browsingContextControllerDidChangeBackForwardList:browsingContext addedItem:added removedItems:removed];
 }
 
+static void processDidCrash(WKPageRef page, const void* clientInfo)
+{
+    WKBrowsingContextController *browsingContext = (WKBrowsingContextController *)clientInfo;
+    auto loadDelegate = browsingContext->_loadDelegate.get();
+
+    if ([loadDelegate respondsToSelector:@selector(browsingContextControllerWebProcessDidCrash:)])
+        [(id <WKBrowsingContextLoadDelegatePrivate>)loadDelegate browsingContextControllerWebProcessDidCrash:browsingContext];
+}
+
 static void setUpPageLoaderClient(WKBrowsingContextController *browsingContext, WebPageProxy& page)
 {
     WKPageLoaderClientV3 loaderClient;
@@ -534,6 +543,8 @@
     loaderClient.didFinishProgress = didFinishProgress;
     loaderClient.didChangeBackForwardList = didChangeBackForwardList;
 
+    loaderClient.processDidCrash = processDidCrash;
+
     page.initializeLoaderClient(&loaderClient.base);
 }
 

Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKBrowsingContextLoadDelegatePrivate.h (160511 => 160512)


--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKBrowsingContextLoadDelegatePrivate.h	2013-12-12 23:46:36 UTC (rev 160511)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKBrowsingContextLoadDelegatePrivate.h	2013-12-12 23:49:22 UTC (rev 160512)
@@ -31,4 +31,6 @@
 - (BOOL)browsingContextController:(WKBrowsingContextController *)sender canAuthenticateAgainstProtectionSpace:(NSURLProtectionSpace *)protectionSpace;
 - (void)browsingContextController:(WKBrowsingContextController *)sender didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge;
 
+- (void)browsingContextControllerWebProcessDidCrash:(WKBrowsingContextController *)sender;
+
 @end
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to