Changeset 160512 in webkit


Ignore:
Timestamp:
Dec 12, 2013 3:49:22 PM (10 years ago)
Author:
mitz@apple.com
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.
Location:
trunk/Source/WebKit2
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r160509 r160512  
     12013-12-12  Dan Bernstein  <mitz@apple.com>
     2
     3        [Cocoa] Let the load delegate know when the Web process crashes
     4        https://bugs.webkit.org/show_bug.cgi?id=125660
     5
     6        Reviewed by Sam Weinig.
     7
     8        * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
     9        (processDidCrash):  Implemented this WKPageLoaderClient callback by calling the load
     10        delegate.
     11        (setUpPageLoaderClient): Set the above callback in the client structure
     12        * UIProcess/API/Cocoa/WKBrowsingContextLoadDelegatePrivate.h: Declare new delegate method.
     13
    1142013-12-12  Anders Carlsson  <andersca@apple.com>
    215
  • trunk/Source/WebKit2/UIProcess/API/Cocoa/WKBrowsingContextController.mm

    r160495 r160512  
    513513}
    514514
     515static void processDidCrash(WKPageRef page, const void* clientInfo)
     516{
     517    WKBrowsingContextController *browsingContext = (WKBrowsingContextController *)clientInfo;
     518    auto loadDelegate = browsingContext->_loadDelegate.get();
     519
     520    if ([loadDelegate respondsToSelector:@selector(browsingContextControllerWebProcessDidCrash:)])
     521        [(id <WKBrowsingContextLoadDelegatePrivate>)loadDelegate browsingContextControllerWebProcessDidCrash:browsingContext];
     522}
     523
    515524static void setUpPageLoaderClient(WKBrowsingContextController *browsingContext, WebPageProxy& page)
    516525{
     
    534543    loaderClient.didFinishProgress = didFinishProgress;
    535544    loaderClient.didChangeBackForwardList = didChangeBackForwardList;
     545
     546    loaderClient.processDidCrash = processDidCrash;
    536547
    537548    page.initializeLoaderClient(&loaderClient.base);
  • trunk/Source/WebKit2/UIProcess/API/Cocoa/WKBrowsingContextLoadDelegatePrivate.h

    r160227 r160512  
    3232- (void)browsingContextController:(WKBrowsingContextController *)sender didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge;
    3333
     34- (void)browsingContextControllerWebProcessDidCrash:(WKBrowsingContextController *)sender;
     35
    3436@end
Note: See TracChangeset for help on using the changeset viewer.