Commit f451bf4d authored by mitz@apple.com's avatar mitz@apple.com

[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.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160512 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 3625d47c
2013-12-12 Dan Bernstein <mitz@apple.com>
[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 <andersca@apple.com>
Move MessageSender to Platform/IPC.
......
......@@ -512,6 +512,15 @@ static void didChangeBackForwardList(WKPageRef page, WKBackForwardListItemRef ad
[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 @@ static void setUpPageLoaderClient(WKBrowsingContextController *browsingContext,
loaderClient.didFinishProgress = didFinishProgress;
loaderClient.didChangeBackForwardList = didChangeBackForwardList;
loaderClient.processDidCrash = processDidCrash;
page.initializeLoaderClient(&loaderClient.base);
}
......
......@@ -31,4 +31,6 @@
- (BOOL)browsingContextController:(WKBrowsingContextController *)sender canAuthenticateAgainstProtectionSpace:(NSURLProtectionSpace *)protectionSpace;
- (void)browsingContextController:(WKBrowsingContextController *)sender didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge;
- (void)browsingContextControllerWebProcessDidCrash:(WKBrowsingContextController *)sender;
@end
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment