Title: [100621] trunk/Source/WebKit2
- Revision
- 100621
- Author
- [email protected]
- Date
- 2011-11-17 07:38:14 -0800 (Thu, 17 Nov 2011)
Log 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:
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (100620 => 100621)
--- trunk/Source/WebKit2/ChangeLog 2011-11-17 15:05:54 UTC (rev 100620)
+++ trunk/Source/WebKit2/ChangeLog 2011-11-17 15:38:14 UTC (rev 100621)
@@ -1,3 +1,27 @@
+2011-11-17 Kenneth Rohde Christiansen <[email protected]>
+
+ 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:
+
2011-11-17 Alexis Menard <[email protected]>
[Qt][WK2] Cleanup dead code in QtWebPageProxy.
Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp (100620 => 100621)
--- trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp 2011-11-17 15:05:54 UTC (rev 100620)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp 2011-11-17 15:38:14 UTC (rev 100621)
@@ -150,6 +150,7 @@
, m_isInWindow(m_pageClient->isViewInWindow())
, m_isVisible(m_pageClient->isViewVisible())
, m_backForwardList(WebBackForwardList::create(this))
+ , m_loadStateAtProcessExit(WebFrameProxy::LoadStateFinished)
, m_textZoomFactor(1)
, m_pageZoomFactor(1)
, m_pageScaleFactor(1)
@@ -3077,6 +3078,11 @@
m_isValid = false;
+ if (m_mainFrame) {
+ m_urlAtProcessExit = m_mainFrame->url();
+ m_loadStateAtProcessExit = m_mainFrame->loadState();
+ }
+
m_mainFrame = nullptr;
m_drawingArea = nullptr;
Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.h (100620 => 100621)
--- trunk/Source/WebKit2/UIProcess/WebPageProxy.h 2011-11-17 15:05:54 UTC (rev 100620)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.h 2011-11-17 15:38:14 UTC (rev 100621)
@@ -512,7 +512,10 @@
WebPageGroup* pageGroup() const { return m_pageGroup.get(); }
bool isValid();
-
+
+ const String& urlAtProcessExit() const { return m_urlAtProcessExit; }
+ WebFrameProxy::LoadState loadStateAtProcessExit() const { return m_loadStateAtProcessExit; }
+
WebCore::DragSession dragSession() const { return m_currentDragSession; }
void resetDragOperation() { m_currentDragSession = WebCore::DragSession(); }
@@ -876,6 +879,9 @@
String m_toolTip;
+ String m_urlAtProcessExit;
+ WebFrameProxy::LoadState m_loadStateAtProcessExit;
+
EditorState m_editorState;
double m_textZoomFactor;
Modified: trunk/Source/WebKit2/UIProcess/qt/QtViewInterface.cpp (100620 => 100621)
--- trunk/Source/WebKit2/UIProcess/qt/QtViewInterface.cpp 2011-11-17 15:05:54 UTC (rev 100620)
+++ trunk/Source/WebKit2/UIProcess/qt/QtViewInterface.cpp 2011-11-17 15:38:14 UTC (rev 100621)
@@ -214,14 +214,15 @@
return m_viewportView->d_func()->runJavaScriptPrompt(message, defaultValue, ok);
}
-void QtViewInterface::processDidCrash()
+void QtViewInterface::processDidCrash(const QUrl& url)
{
- // FIXME
+ qWarning("WARNING: The web process experienced a crash on '%s'.", qPrintable(url.toString(QUrl::RemoveUserInfo)));
+
}
void QtViewInterface::didRelaunchProcess()
{
- // FIXME
+ qWarning("WARNING: The web process has been successfully restarted.");
}
QJSEngine* QtViewInterface::engine()
Modified: trunk/Source/WebKit2/UIProcess/qt/QtViewInterface.h (100620 => 100621)
--- trunk/Source/WebKit2/UIProcess/qt/QtViewInterface.h 2011-11-17 15:05:54 UTC (rev 100620)
+++ trunk/Source/WebKit2/UIProcess/qt/QtViewInterface.h 2011-11-17 15:38:14 UTC (rev 100621)
@@ -95,7 +95,7 @@
virtual bool runJavaScriptConfirm(const QString&);
virtual QString runJavaScriptPrompt(const QString&, const QString& defaultValue, bool& ok);
- virtual void processDidCrash();
+ virtual void processDidCrash(const QUrl&);
virtual void didRelaunchProcess();
virtual QJSEngine* engine();
Modified: trunk/Source/WebKit2/UIProcess/qt/QtWebPageProxy.cpp (100620 => 100621)
--- trunk/Source/WebKit2/UIProcess/qt/QtWebPageProxy.cpp 2011-11-17 15:05:54 UTC (rev 100620)
+++ trunk/Source/WebKit2/UIProcess/qt/QtWebPageProxy.cpp 2011-11-17 15:38:14 UTC (rev 100621)
@@ -669,7 +669,9 @@
m_panGestureRecognizer.reset();
m_pinchGestureRecognizer.reset();
m_tapGestureRecognizer.reset();
- m_viewInterface->processDidCrash();
+
+ WebCore::KURL url(WebCore::ParsedURLString, m_webPageProxy->urlAtProcessExit());
+ m_viewInterface->processDidCrash(QUrl(url));
}
QWebPreferences* QtWebPageProxy::preferences() const
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes