Changeset 100621 in webkit


Ignore:
Timestamp:
Nov 17, 2011 7:38:14 AM (12 years ago)
Author:
kenneth@webkit.org
Message:

Print warning for the Qt port when a process crashes and is relaunched
https://bugs.webkit.org/show_bug.cgi?id=72607

Reviewed by Antonio Gomes.

Make the QtViewInterface::processDidCrash take a URL string argument,
for being able to say which url was the origin of the crash.

We now additionally store the load state and url at process exit. This
is needed for printing the warning and for further crash handling.

  • UIProcess/PageClient.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::processDidCrash):

  • UIProcess/qt/QtViewInterface.cpp:

(WebKit::QtViewInterface::processDidCrash):
(WebKit::QtViewInterface::didRelaunchProcess):

  • UIProcess/qt/QtViewInterface.h:
  • UIProcess/qt/QtWebPageProxy.cpp:

(QtWebPageProxy::processDidCrash):

  • UIProcess/qt/QtWebPageProxy.h:
Location:
trunk/Source/WebKit2
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r100617 r100621  
     12011-11-17  Kenneth Rohde Christiansen  <kenneth@webkit.org>
     2
     3        Print warning for the Qt port when a process crashes and is relaunched
     4        https://bugs.webkit.org/show_bug.cgi?id=72607
     5
     6        Reviewed by Antonio Gomes.
     7
     8        Make the QtViewInterface::processDidCrash take a URL string argument,
     9        for being able to say which url was the origin of the crash.
     10
     11        We now additionally store the load state and url at process exit. This
     12        is needed for printing the warning and for further crash handling.
     13
     14        * UIProcess/PageClient.h:
     15        * UIProcess/WebPageProxy.cpp:
     16        (WebKit::WebPageProxy::processDidCrash):
     17        * UIProcess/qt/QtViewInterface.cpp:
     18        (WebKit::QtViewInterface::processDidCrash):
     19        (WebKit::QtViewInterface::didRelaunchProcess):
     20        * UIProcess/qt/QtViewInterface.h:
     21        * UIProcess/qt/QtWebPageProxy.cpp:
     22        (QtWebPageProxy::processDidCrash):
     23        * UIProcess/qt/QtWebPageProxy.h:
     24
    1252011-11-17  Alexis Menard  <alexis.menard@openbossa.org>
    226
  • trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp

    r100534 r100621  
    151151    , m_isVisible(m_pageClient->isViewVisible())
    152152    , m_backForwardList(WebBackForwardList::create(this))
     153    , m_loadStateAtProcessExit(WebFrameProxy::LoadStateFinished)
    153154    , m_textZoomFactor(1)
    154155    , m_pageZoomFactor(1)
     
    30783079    m_isValid = false;
    30793080
     3081    if (m_mainFrame) {
     3082        m_urlAtProcessExit = m_mainFrame->url();
     3083        m_loadStateAtProcessExit = m_mainFrame->loadState();
     3084    }
     3085
    30803086    m_mainFrame = nullptr;
    30813087    m_drawingArea = nullptr;
  • trunk/Source/WebKit2/UIProcess/WebPageProxy.h

    r100534 r100621  
    513513
    514514    bool isValid();
    515    
     515
     516    const String& urlAtProcessExit() const { return m_urlAtProcessExit; }
     517    WebFrameProxy::LoadState loadStateAtProcessExit() const { return m_loadStateAtProcessExit; }
     518
    516519    WebCore::DragSession dragSession() const { return m_currentDragSession; }
    517520    void resetDragOperation() { m_currentDragSession = WebCore::DragSession(); }
     
    877880    String m_toolTip;
    878881
     882    String m_urlAtProcessExit;
     883    WebFrameProxy::LoadState m_loadStateAtProcessExit;
     884
    879885    EditorState m_editorState;
    880886
  • trunk/Source/WebKit2/UIProcess/qt/QtViewInterface.cpp

    r100602 r100621  
    215215}
    216216
    217 void QtViewInterface::processDidCrash()
    218 {
    219     // FIXME
     217void QtViewInterface::processDidCrash(const QUrl& url)
     218{
     219    qWarning("WARNING: The web process experienced a crash on '%s'.", qPrintable(url.toString(QUrl::RemoveUserInfo)));
     220
    220221}
    221222
    222223void QtViewInterface::didRelaunchProcess()
    223224{
    224     // FIXME
     225    qWarning("WARNING: The web process has been successfully restarted.");
    225226}
    226227
  • trunk/Source/WebKit2/UIProcess/qt/QtViewInterface.h

    r100590 r100621  
    9696    virtual QString runJavaScriptPrompt(const QString&, const QString& defaultValue, bool& ok);
    9797
    98     virtual void processDidCrash();
     98    virtual void processDidCrash(const QUrl&);
    9999    virtual void didRelaunchProcess();
    100100
  • trunk/Source/WebKit2/UIProcess/qt/QtWebPageProxy.cpp

    r100617 r100621  
    670670    m_pinchGestureRecognizer.reset();
    671671    m_tapGestureRecognizer.reset();
    672     m_viewInterface->processDidCrash();
     672
     673    WebCore::KURL url(WebCore::ParsedURLString, m_webPageProxy->urlAtProcessExit());
     674    m_viewInterface->processDidCrash(QUrl(url));
    673675}
    674676
Note: See TracChangeset for help on using the changeset viewer.