Changeset 164146 in webkit


Ignore:
Timestamp:
Feb 14, 2014 5:06:42 PM (10 years ago)
Author:
andersca@apple.com
Message:

Add SPI for monitoring web process crashes
https://bugs.webkit.org/show_bug.cgi?id=128851

Reviewed by Beth Dakin.

  • UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h:
  • UIProcess/Cocoa/NavigationState.h:
  • UIProcess/Cocoa/NavigationState.mm:

(WebKit::NavigationState::setNavigationDelegate):
(WebKit::NavigationState::LoaderClient::processDidCrash):

Location:
trunk/Source/WebKit2
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r164138 r164146  
     12014-02-14  Anders Carlsson  <andersca@apple.com>
     2
     3        Add SPI for monitoring web process crashes
     4        https://bugs.webkit.org/show_bug.cgi?id=128851
     5
     6        Reviewed by Beth Dakin.
     7
     8        * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h:
     9        * UIProcess/Cocoa/NavigationState.h:
     10        * UIProcess/Cocoa/NavigationState.mm:
     11        (WebKit::NavigationState::setNavigationDelegate):
     12        (WebKit::NavigationState::LoaderClient::processDidCrash):
     13
    1142014-02-14  Anders Carlsson  <andersca@apple.com>
    215
  • trunk/Source/WebKit2/UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h

    r164138 r164146  
    3838- (void)_webView:(WKWebView *)webView didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge;
    3939
     40- (void)_webViewWebProcessDidCrash:(WKWebView *)webView;
     41
    4042@end
    4143
  • trunk/Source/WebKit2/UIProcess/Cocoa/NavigationState.h

    r164138 r164146  
    8787        virtual bool canAuthenticateAgainstProtectionSpaceInFrame(WebKit::WebPageProxy*, WebKit::WebFrameProxy*, WebKit::WebProtectionSpace*) override;
    8888        virtual void didReceiveAuthenticationChallengeInFrame(WebKit::WebPageProxy*, WebKit::WebFrameProxy*, WebKit::AuthenticationChallengeProxy*) override;
     89        virtual void processDidCrash(WebKit::WebPageProxy*) override;
    8990        virtual void didChangeBackForwardList(WebKit::WebPageProxy*, WebKit::WebBackForwardListItem* addedItem, Vector<RefPtr<WebKit::WebBackForwardListItem>> removedItems) override;
    9091
     
    121122        bool webViewCanAuthenticateAgainstProtectionSpace : 1;
    122123        bool webViewDidReceiveAuthenticationChallenge : 1;
     124        bool webViewWebProcessDidCrash : 1;
    123125    } m_navigationDelegateMethods;
    124126
  • trunk/Source/WebKit2/UIProcess/Cocoa/NavigationState.mm

    r164138 r164146  
    9292    m_navigationDelegateMethods.webViewCanAuthenticateAgainstProtectionSpace = [delegate respondsToSelector:@selector(_webView:canAuthenticateAgainstProtectionSpace:)];
    9393    m_navigationDelegateMethods.webViewDidReceiveAuthenticationChallenge = [delegate respondsToSelector:@selector(_webView:didReceiveAuthenticationChallenge:)];
     94    m_navigationDelegateMethods.webViewWebProcessDidCrash = [delegate respondsToSelector:@selector(_webViewWebProcessDidCrash:)];
    9495}
    9596
     
    403404}
    404405
     406void NavigationState::LoaderClient::processDidCrash(WebKit::WebPageProxy*)
     407{
     408    if (!m_navigationState.m_navigationDelegateMethods.webViewWebProcessDidCrash)
     409        return;
     410
     411    auto navigationDelegate = m_navigationState.m_navigationDelegate.get();
     412    if (!navigationDelegate)
     413        return;
     414
     415    [static_cast<id <WKNavigationDelegatePrivate>>(navigationDelegate.get()) _webViewWebProcessDidCrash:m_navigationState.m_webView];
     416}
     417
    405418void NavigationState::LoaderClient::didChangeBackForwardList(WebKit::WebPageProxy*, WebKit::WebBackForwardListItem* addedItem, Vector<RefPtr<WebKit::WebBackForwardListItem>> removedItems)
    406419{
Note: See TracChangeset for help on using the changeset viewer.