Title: [202393] trunk/Source/WebKit2
Revision
202393
Author
[email protected]
Date
2016-06-23 12:58:56 -0700 (Thu, 23 Jun 2016)

Log Message

[iOS] A WebPageProxy in closed state should not be allowed to hold a process assertion
https://bugs.webkit.org/show_bug.cgi?id=159068
<rdar://problem/17665473>

Reviewed by Tim Horton.

A WebPageProxy in closed state should not be allowed to hold a process assertion. It
currently happens that WebPageProxy::close() gets called but that the WebPageProxy is
kept alive by Safari (e.g. In case of top-hit preloading). In such cases, we fail to
release the foreground process assertion that the WebPageProxy holds.

We should clear the foreground process assertion that the WebPageProxy holds as soon
as WebPageProxy::close() is called.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::close):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (202392 => 202393)


--- trunk/Source/WebKit2/ChangeLog	2016-06-23 19:24:34 UTC (rev 202392)
+++ trunk/Source/WebKit2/ChangeLog	2016-06-23 19:58:56 UTC (rev 202393)
@@ -1,3 +1,22 @@
+2016-06-23  Chris Dumez  <[email protected]>
+
+        [iOS] A WebPageProxy in closed state should not be allowed to hold a process assertion
+        https://bugs.webkit.org/show_bug.cgi?id=159068
+        <rdar://problem/17665473>
+
+        Reviewed by Tim Horton.
+
+        A WebPageProxy in closed state should not be allowed to hold a process assertion. It
+        currently happens that WebPageProxy::close() gets called but that the WebPageProxy is
+        kept alive by Safari (e.g. In case of top-hit preloading). In such cases, we fail to
+        release the foreground process assertion that the WebPageProxy holds.
+
+        We should clear the foreground process assertion that the WebPageProxy holds as soon
+        as WebPageProxy::close() is called.
+
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::close):
+
 2016-06-23  Brent Fulgham  <[email protected]>
 
         [OS X][WK2] Expand sandbox for new mach endpoints

Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp (202392 => 202393)


--- trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp	2016-06-23 19:24:34 UTC (rev 202392)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp	2016-06-23 19:58:56 UTC (rev 202393)
@@ -868,6 +868,11 @@
     m_process->removeWebPage(m_pageID);
     m_process->removeMessageReceiver(Messages::WebPageProxy::messageReceiverName(), m_pageID);
     m_process->processPool().supplement<WebNotificationManagerProxy>()->clearNotifications(this);
+
+#if PLATFORM(IOS)
+    // Make sure we don't hold a process assertion after getting closed.
+    m_activityToken = nullptr;
+#endif
 }
 
 bool WebPageProxy::tryClose()
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to