Web Inspector: Canvas: remove agent as observer when disabling
authordrousso@apple.com <drousso@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 16 Mar 2019 02:21:45 +0000 (02:21 +0000)
committerdrousso@apple.com <drousso@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 16 Mar 2019 02:21:45 +0000 (02:21 +0000)
https://bugs.webkit.org/show_bug.cgi?id=195825
<rdar://problem/48940255>

Reviewed by Joseph Pecoraro.

No change in functionality.

* inspector/agents/InspectorCanvasAgent.cpp:
(WebCore::InspectorCanvasAgent::disable):

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

Source/WebCore/ChangeLog
Source/WebCore/inspector/agents/InspectorCanvasAgent.cpp

index a40e0f7..d0c87cf 100644 (file)
@@ -1,3 +1,16 @@
+2019-03-15  Devin Rousso  <drousso@apple.com>
+
+        Web Inspector: Canvas: remove agent as observer when disabling
+        https://bugs.webkit.org/show_bug.cgi?id=195825
+        <rdar://problem/48940255>
+
+        Reviewed by Joseph Pecoraro.
+
+        No change in functionality.
+
+        * inspector/agents/InspectorCanvasAgent.cpp:
+        (WebCore::InspectorCanvasAgent::disable):
+
 2019-03-15  Ryosuke Niwa  <rniwa@webkit.org>
 
         REGRESSION (r239814): Most classes that user Timer have 7 bytes of padding after the Timer
index 38b4f13..4119089 100644 (file)
@@ -143,18 +143,7 @@ void InspectorCanvasAgent::disable(ErrorString&)
 {
     m_instrumentingAgents.setInspectorCanvasAgent(nullptr);
 
-#if ENABLE(WEBGL)
-    m_identifierToInspectorProgram.clear();
-#endif
-
-    m_identifierToInspectorCanvas.clear();
-    m_removedCanvasIdentifiers.clear();
-
-    if (m_canvasDestroyedTimer.isActive())
-        m_canvasDestroyedTimer.stop();
-
-    if (m_canvasRecordingTimer.isActive())
-        m_canvasRecordingTimer.stop();
+    clearCanvasData();
 
     m_recordingAutoCaptureFrameCount = WTF::nullopt;
 }