Title: [195256] releases/WebKitGTK/webkit-2.10/Source/WebKit2
Revision
195256
Author
[email protected]
Date
2016-01-19 00:12:43 -0800 (Tue, 19 Jan 2016)

Log Message

Merge r194925 - WebPageProxy should reattach to the web process before navigating
https://bugs.webkit.org/show_bug.cgi?id=153026

Reviewed by Anders Carlsson.

This fixes a crash (and lots of other corruption) when force-quitting
the web process during navigation.

Some objects (like ViewGestureController) use one-time initialization
to point to a ChildProcessProxy -- and, by design, we destroy them when
the ChildProcessProxy becomes invalid (i.e., crashes or quits).

If we navigate *before* creating a new, valid ChildProcessProxy, then
we accidentally re-create these objects pointing to the old, invalid
ChildProcessProxy.

We need to wait until we have a valid ChildProcessProxy before we
initialize these objects.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::reattachToWebProcessWithItem): Navigate after
reattaching to the web process so that lazily allocated helper objects
point to the right ChildProcessProxy.

Modified Paths

Diff

Modified: releases/WebKitGTK/webkit-2.10/Source/WebKit2/ChangeLog (195255 => 195256)


--- releases/WebKitGTK/webkit-2.10/Source/WebKit2/ChangeLog	2016-01-19 08:09:47 UTC (rev 195255)
+++ releases/WebKitGTK/webkit-2.10/Source/WebKit2/ChangeLog	2016-01-19 08:12:43 UTC (rev 195256)
@@ -1,3 +1,29 @@
+2016-01-12  Geoffrey Garen  <[email protected]>
+
+        WebPageProxy should reattach to the web process before navigating
+        https://bugs.webkit.org/show_bug.cgi?id=153026
+
+        Reviewed by Anders Carlsson.
+
+        This fixes a crash (and lots of other corruption) when force-quitting
+        the web process during navigation.
+
+        Some objects (like ViewGestureController) use one-time initialization
+        to point to a ChildProcessProxy -- and, by design, we destroy them when
+        the ChildProcessProxy becomes invalid (i.e., crashes or quits).
+
+        If we navigate *before* creating a new, valid ChildProcessProxy, then
+        we accidentally re-create these objects pointing to the old, invalid
+        ChildProcessProxy.
+
+        We need to wait until we have a valid ChildProcessProxy before we
+        initialize these objects.
+
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::reattachToWebProcessWithItem): Navigate after
+        reattaching to the web process so that lazily allocated helper objects
+        point to the right ChildProcessProxy.
+
 2016-01-12  Carlos Garcia Campos  <[email protected]>
 
         [GTK] UI process crashes if webkit_web_view_get_tls_info is called before internal load-committed event

Modified: releases/WebKitGTK/webkit-2.10/Source/WebKit2/UIProcess/WebPageProxy.cpp (195255 => 195256)


--- releases/WebKitGTK/webkit-2.10/Source/WebKit2/UIProcess/WebPageProxy.cpp	2016-01-19 08:09:47 UTC (rev 195255)
+++ releases/WebKitGTK/webkit-2.10/Source/WebKit2/UIProcess/WebPageProxy.cpp	2016-01-19 08:12:43 UTC (rev 195256)
@@ -740,15 +740,15 @@
     if (m_isClosed)
         return nullptr;
 
-    if (item && item != m_backForwardList->currentItem())
-        m_backForwardList->goToItem(item);
-
     ASSERT(!isValid());
     reattachToWebProcess();
 
     if (!item)
         return nullptr;
 
+    if (item != m_backForwardList->currentItem())
+        m_backForwardList->goToItem(item);
+
     auto navigation = m_navigationState->createBackForwardNavigation();
 
     m_process->send(Messages::WebPage::GoToBackForwardItem(navigation->navigationID(), item->itemID()), m_pageID);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to