Changeset 64132 in webkit


Ignore:
Timestamp:
Jul 27, 2010 9:06:48 AM (14 years ago)
Author:
Adam Roben
Message:

Add a ProcessDidExit callback to the WKPageLoaderClient

Fixes <http://webkit.org/b/43048> UI process needs a way to find out
when the web process crashes

Reviewed by Anders Carlsson.

  • UIProcess/API/C/WKPage.h: Added WKPageProcessDidExitCallback, and a

processDidExit member of that type to WKPageLoaderClient.

  • UIProcess/WebLoaderClient.cpp:

(WebKit::WebLoaderClient::processDidExit): Added. Calls through to the
WKPageLoaderClient.

  • UIProcess/WebLoaderClient.h: Added processDidExit.
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::processDidExit): Tell the loader client the
process exited.

Location:
trunk/WebKit2
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKit2/ChangeLog

    r64127 r64132  
     12010-07-27  Adam Roben  <aroben@apple.com>
     2
     3        Add a ProcessDidExit callback to the WKPageLoaderClient
     4
     5        Fixes <http://webkit.org/b/43048> UI process needs a way to find out
     6        when the web process crashes
     7
     8        Reviewed by Anders Carlsson.
     9
     10        * UIProcess/API/C/WKPage.h: Added WKPageProcessDidExitCallback, and a
     11        processDidExit member of that type to WKPageLoaderClient.
     12
     13        * UIProcess/WebLoaderClient.cpp:
     14        (WebKit::WebLoaderClient::processDidExit): Added. Calls through to the
     15        WKPageLoaderClient.
     16
     17        * UIProcess/WebLoaderClient.h: Added processDidExit.
     18
     19        * UIProcess/WebPageProxy.cpp:
     20        (WebKit::WebPageProxy::processDidExit): Tell the loader client the
     21        process exited.
     22
    1232010-07-27  Andras Becsi  <abecsi@webkit.org>
    224
  • trunk/WebKit2/UIProcess/API/C/WKPage.h

    r64065 r64132  
    6666
    6767// WebPageNamespace Client
    68 // FIXME: These two methods should not be part of this client.
     68// FIXME: These three functions should not be part of this client.
    6969typedef void (*WKPageDidBecomeUnresponsiveCallback)(WKPageRef page, const void *clientInfo);
    7070typedef void (*WKPageDidBecomeResponsiveCallback)(WKPageRef page, const void *clientInfo);
     71typedef void (*WKPageProcessDidExitCallback)(WKPageRef page, const void *clientInfo);
    7172
    7273typedef void (*WKPageDidChangeBackForwardListCallback)(WKPageRef page, const void *clientInfo);
     
    9091    WKPageDidFinishProgressCallback                                     didFinishProgress;
    9192
    92     // FIXME: These two methods should not be part of this client.
     93    // FIXME: These three functions should not be part of this client.
    9394    WKPageDidBecomeUnresponsiveCallback                                 didBecomeUnresponsive;
    9495    WKPageDidBecomeResponsiveCallback                                   didBecomeResponsive;
     96    WKPageProcessDidExitCallback                                        processDidExit;
    9597
    9698    WKPageDidChangeBackForwardListCallback                              didChangeBackForwardList;
  • trunk/WebKit2/UIProcess/WebLoaderClient.cpp

    r63590 r64132  
    128128}
    129129
     130void WebLoaderClient::processDidExit(WebPageProxy* page)
     131{
     132    if (m_pageLoaderClient.processDidExit)
     133        m_pageLoaderClient.processDidExit(toRef(page), m_pageLoaderClient.clientInfo);
     134}
     135
    130136void WebLoaderClient::didChangeBackForwardList(WebPageProxy* page)
    131137{
  • trunk/WebKit2/UIProcess/WebLoaderClient.h

    r63590 r64132  
    5656    void didFinishProgress(WebPageProxy*);
    5757
    58     // FIXME: These two methods should not be part of this client.
     58    // FIXME: These three functions should not be part of this client.
    5959    void didBecomeUnresponsive(WebPageProxy*);
    6060    void didBecomeResponsive(WebPageProxy*);
     61    void processDidExit(WebPageProxy*);
    6162
    6263    void didChangeBackForwardList(WebPageProxy*);
  • trunk/WebKit2/UIProcess/WebPageProxy.cpp

    r64065 r64132  
    10151015
    10161016    m_estimatedProgress = 0.0;
    1017    
     1017
    10181018    m_pageClient->processDidExit();
     1019    m_loaderClient.processDidExit(this);
    10191020}
    10201021
Note: See TracChangeset for help on using the changeset viewer.