Delete display link when closing page or the WebContent process has crashed.
authorpvollan@apple.com <pvollan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 2 Jul 2018 14:35:16 +0000 (14:35 +0000)
committerpvollan@apple.com <pvollan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 2 Jul 2018 14:35:16 +0000 (14:35 +0000)
https://bugs.webkit.org/show_bug.cgi?id=186895

Reviewed by Brent Fulgham.

If there is a running display link in the UI process, there is no need to keep it around if the
page is being closed or the WebContent process has crashed.

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

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@233422 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit/ChangeLog
Source/WebKit/UIProcess/WebPageProxy.cpp

index 48a4b47..910b9f5 100644 (file)
@@ -1,3 +1,17 @@
+2018-07-02  Per Arne Vollan  <pvollan@apple.com>
+
+        Delete display link when closing page or the WebContent process has crashed.
+        https://bugs.webkit.org/show_bug.cgi?id=186895
+
+        Reviewed by Brent Fulgham.
+
+        If there is a running display link in the UI process, there is no need to keep it around if the
+        page is being closed or the WebContent process has crashed.
+
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::close):
+        (WebKit::WebPageProxy::resetStateAfterProcessExited):
+
 2018-06-23  Darin Adler  <darin@apple.com>
 
         [Cocoa] Improve ARC compatibility of more code in JavaScriptCore
index 99aeede..d9da02b 100644 (file)
@@ -920,6 +920,10 @@ void WebPageProxy::close()
     m_activityToken = nullptr;
 #endif
 
+#if PLATFORM(MAC) && ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING)
+    m_displayLink = nullptr;
+#endif
+
     stopAllURLSchemeTasks();
 }
 
@@ -6085,6 +6089,11 @@ void WebPageProxy::resetStateAfterProcessExited(ProcessTerminationReason termina
 #if PLATFORM(IOS)
     m_activityToken = nullptr;
 #endif
+
+#if PLATFORM(MAC) && ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING)
+    m_displayLink = nullptr;
+#endif
+
     m_pageIsUserObservableCount = nullptr;
     m_visiblePageToken = nullptr;