Title: [248389] trunk/Source
Revision
248389
Author
[email protected]
Date
2019-08-07 14:17:36 -0700 (Wed, 07 Aug 2019)

Log Message

Web Inspector: Uncaught Exception: TimelineAgent already enabled
https://bugs.webkit.org/show_bug.cgi?id=200513

Reviewed by Joseph Pecoraro.

Source/WebCore:

Call `disable` when the last frontend disconnects, so that if Web Inspector is reopened the
`TimelineAgent` is back to being in a disabled state.

* inspector/agents/InspectorTimelineAgent.cpp:
(WebCore::InspectorTimelineAgent::willDestroyFrontendAndBackend):

Source/WebInspectorUI:

Update some incorrect compatibility comments from r248286.

* UserInterface/Protocol/InspectorFrontendAPI.js:
* UserInterface/Controllers/TimelineManager.js:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (248388 => 248389)


--- trunk/Source/WebCore/ChangeLog	2019-08-07 21:12:54 UTC (rev 248388)
+++ trunk/Source/WebCore/ChangeLog	2019-08-07 21:17:36 UTC (rev 248389)
@@ -1,3 +1,16 @@
+2019-08-07  Devin Rousso  <[email protected]>
+
+        Web Inspector: Uncaught Exception: TimelineAgent already enabled
+        https://bugs.webkit.org/show_bug.cgi?id=200513
+
+        Reviewed by Joseph Pecoraro.
+
+        Call `disable` when the last frontend disconnects, so that if Web Inspector is reopened the
+        `TimelineAgent` is back to being in a disabled state.
+
+        * inspector/agents/InspectorTimelineAgent.cpp:
+        (WebCore::InspectorTimelineAgent::willDestroyFrontendAndBackend):
+
 2019-08-07  Jer Noble  <[email protected]>
 
         Muted <video> elements can block display from sleeping.

Modified: trunk/Source/WebCore/inspector/agents/InspectorTimelineAgent.cpp (248388 => 248389)


--- trunk/Source/WebCore/inspector/agents/InspectorTimelineAgent.cpp	2019-08-07 21:12:54 UTC (rev 248388)
+++ trunk/Source/WebCore/inspector/agents/InspectorTimelineAgent.cpp	2019-08-07 21:17:36 UTC (rev 248389)
@@ -100,6 +100,8 @@
 
 void InspectorTimelineAgent::willDestroyFrontendAndBackend(Inspector::DisconnectReason)
 {
+    ErrorString ignored;
+    disable(ignored);
 }
 
 void InspectorTimelineAgent::enable(ErrorString& errorString)

Modified: trunk/Source/WebInspectorUI/ChangeLog (248388 => 248389)


--- trunk/Source/WebInspectorUI/ChangeLog	2019-08-07 21:12:54 UTC (rev 248388)
+++ trunk/Source/WebInspectorUI/ChangeLog	2019-08-07 21:17:36 UTC (rev 248389)
@@ -1,3 +1,15 @@
+2019-08-07  Devin Rousso  <[email protected]>
+
+        Web Inspector: Uncaught Exception: TimelineAgent already enabled
+        https://bugs.webkit.org/show_bug.cgi?id=200513
+
+        Reviewed by Joseph Pecoraro.
+
+        Update some incorrect compatibility comments from r248286.
+
+        * UserInterface/Protocol/InspectorFrontendAPI.js:
+        * UserInterface/Controllers/TimelineManager.js:
+
 2019-08-06  Devin Rousso  <[email protected]>
 
         Web Inspector: Show radius values in box model metrics view

Modified: trunk/Source/WebInspectorUI/UserInterface/Controllers/TimelineManager.js (248388 => 248389)


--- trunk/Source/WebInspectorUI/UserInterface/Controllers/TimelineManager.js	2019-08-07 21:12:54 UTC (rev 248388)
+++ trunk/Source/WebInspectorUI/UserInterface/Controllers/TimelineManager.js	2019-08-07 21:17:36 UTC (rev 248389)
@@ -83,7 +83,7 @@
             return;
 
         if (target.TimelineAgent) {
-            // COMPATIBILITY (iOS 13.1): Timeline.enable did not exist.
+            // COMPATIBILITY (iOS 13): Timeline.enable did not exist yet.
             if (target.TimelineAgent.enable)
                 target.TimelineAgent.enable();
 
@@ -281,7 +281,7 @@
         this.reset();
 
         for (let target of WI.targets) {
-            // COMPATIBILITY (iOS 13.1): Timeline.disable did not exist.
+            // COMPATIBILITY (iOS 13): Timeline.disable did not exist yet.
             if (target.TimelineAgent && target.TimelineAgent.disable)
                 target.TimelineAgent.disable();
         }

Modified: trunk/Source/WebInspectorUI/UserInterface/Protocol/InspectorFrontendAPI.js (248388 => 248389)


--- trunk/Source/WebInspectorUI/UserInterface/Protocol/InspectorFrontendAPI.js	2019-08-07 21:12:54 UTC (rev 248388)
+++ trunk/Source/WebInspectorUI/UserInterface/Protocol/InspectorFrontendAPI.js	2019-08-07 21:17:36 UTC (rev 248389)
@@ -108,7 +108,7 @@
 
     },
 
-    // COMPATIBILITY (iOS 13.1): merged into InspectorFrontendAPI.setTimelineProfilingEnabled.
+    // COMPATIBILITY (iOS 13): merged into InspectorFrontendAPI.setTimelineProfilingEnabled.
     showTimelines: function()
     {
         WI.showTimelineTab();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to