Add a debug overlay with information about web process resource usage.
authorakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 1 Nov 2015 05:47:41 +0000 (05:47 +0000)
committerakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 1 Nov 2015 05:47:41 +0000 (05:47 +0000)
<https://webkit.org/b/150599>

Unreviewed follow-up to r191849.

Add missing call to uninstall the PageOverlay if the ResourceUsageOverlay is being
disabled through the setting. This way you don't end up with an unremovable overlay
in the MiniBrowser.

* page/ResourceUsageOverlay.cpp:
(WebCore::ResourceUsageOverlay::~ResourceUsageOverlay):

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

Source/WebCore/ChangeLog
Source/WebCore/page/ResourceUsageOverlay.cpp

index dae9e2e..957b7ac 100644 (file)
@@ -1,3 +1,17 @@
+2015-10-31  Andreas Kling  <akling@apple.com>
+
+        Add a debug overlay with information about web process resource usage.
+        <https://webkit.org/b/150599>
+
+        Unreviewed follow-up to r191849.
+
+        Add missing call to uninstall the PageOverlay if the ResourceUsageOverlay is being
+        disabled through the setting. This way you don't end up with an unremovable overlay
+        in the MiniBrowser.
+
+        * page/ResourceUsageOverlay.cpp:
+        (WebCore::ResourceUsageOverlay::~ResourceUsageOverlay):
+
 2015-10-31  Brady Eidson  <beidson@apple.com>
 
         IDB: Date objects don't work as keys or values.
index dc650aa..f6bcd9f 100644 (file)
@@ -50,6 +50,10 @@ ResourceUsageOverlay::ResourceUsageOverlay(Page& page)
 ResourceUsageOverlay::~ResourceUsageOverlay()
 {
     platformDestroy();
+
+    // FIXME: This is a hack so we don't try to uninstall the PageOverlay during Page destruction.
+    if (m_page.mainFrame().page())
+        m_page.mainFrame().pageOverlayController().uninstallPageOverlay(m_overlay.get(), PageOverlay::FadeMode::DoNotFade);
 }
 
 bool ResourceUsageOverlay::mouseEvent(PageOverlay&, const PlatformMouseEvent& event)