WebKit::DisplayLink maintains a strong reference to WebPageProxy, creating a referenc...
authorconrad_shultz@apple.com <conrad_shultz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 18 Apr 2018 03:07:10 +0000 (03:07 +0000)
committerconrad_shultz@apple.com <conrad_shultz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 18 Apr 2018 03:07:10 +0000 (03:07 +0000)
https://bugs.webkit.org/show_bug.cgi?id=184718

Reviewed by Tim Horton.

It turns out that the m_webPageProxy back-reference in DisplayLink, which was creating a
reference cycle, wasn't ever read, so we can just remove it.

* UIProcess/mac/DisplayLink.cpp:
(WebKit::DisplayLink::DisplayLink):
* UIProcess/mac/DisplayLink.h:

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

Source/WebKit/ChangeLog
Source/WebKit/UIProcess/mac/DisplayLink.cpp
Source/WebKit/UIProcess/mac/DisplayLink.h

index ba0852e..7b3e2ce 100644 (file)
@@ -1,3 +1,17 @@
+2018-04-17  Conrad Shultz  <conrad_shultz@apple.com>
+
+        WebKit::DisplayLink maintains a strong reference to WebPageProxy, creating a reference cycle
+        https://bugs.webkit.org/show_bug.cgi?id=184718
+
+        Reviewed by Tim Horton.
+
+        It turns out that the m_webPageProxy back-reference in DisplayLink, which was creating a
+        reference cycle, wasn't ever read, so we can just remove it.
+
+        * UIProcess/mac/DisplayLink.cpp:
+        (WebKit::DisplayLink::DisplayLink):
+        * UIProcess/mac/DisplayLink.h:
+
 2018-04-17  Wenson Hsieh  <wenson_hsieh@apple.com>
 
         [Extra zoom mode] Double tap to zoom should account for text legibility in extra zoom mode
index 9e61ddb..b4fa6de 100644 (file)
@@ -36,7 +36,6 @@
 namespace WebKit {
     
 DisplayLink::DisplayLink(WebCore::PlatformDisplayID displayID, WebPageProxy& webPageProxy)
-    : m_webPageProxy(webPageProxy)
 {
     RELEASE_ASSERT(hasProcessPrivilege(ProcessPrivilege::CanCommunicateWithWindowServer));
     CVReturn error = CVDisplayLinkCreateWithCGDisplay(displayID, &m_displayLink);
index 10a17b7..8fe9add 100644 (file)
@@ -49,7 +49,6 @@ private:
     static CVReturn displayLinkCallback(CVDisplayLinkRef, const CVTimeStamp*, const CVTimeStamp*, CVOptionFlags, CVOptionFlags*, void* data);
     
     CVDisplayLinkRef m_displayLink { nullptr };
-    Ref<WebPageProxy> m_webPageProxy;
     HashSet<unsigned> m_observers;
 };