Title: [180901] trunk
Revision
180901
Author
mark....@apple.com
Date
2015-03-02 15:39:47 -0800 (Mon, 02 Mar 2015)

Log Message

The InspectorTimelineAgent should gracefully handle attempts to start more than once.
<https://webkit.org/b/142189>

Reviewed by Joseph Pecoraro.

Source/WebCore:

No new tests.  Unskipped an existing test that already asserts this.

InspectorTimelineAgent::internalStop() already checks for redundant calls to it in
case the InspectorTimelineAgent is already disabled. Similarly,
InspectorTimelineAgent::internalStart() should check if the InspectorTimelineAgent
is already enabled before proceeding to do work to enable it. Though wasteful,
it is legal for clients of the InspectorTimelineAgent to invoke start on it more
than once. Hence, this check is needed.

This check fixes the debug assertion failure when running the
inspector/timeline/debugger-paused-while-recording.html test. The test can now
be unskipped.

* inspector/InspectorTimelineAgent.cpp:
(WebCore::InspectorTimelineAgent::internalStart):

LayoutTests:

* TestExpectations:
- Unskipped inspector/timeline tests.

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (180900 => 180901)


--- trunk/LayoutTests/ChangeLog	2015-03-02 23:35:53 UTC (rev 180900)
+++ trunk/LayoutTests/ChangeLog	2015-03-02 23:39:47 UTC (rev 180901)
@@ -1,3 +1,13 @@
+2015-03-02  Mark Lam  <mark....@apple.com>
+
+        The InspectorTimelineAgent should gracefully handle attempts to start more than once.
+        <https://webkit.org/b/142189>
+
+        Reviewed by Joseph Pecoraro.
+
+        * TestExpectations:
+        - Unskipped inspector/timeline tests.
+
 2015-03-02  Brent Fulgham  <bfulg...@apple.com>
 
         [Win] Skip media control test after r180893.

Modified: trunk/LayoutTests/TestExpectations (180900 => 180901)


--- trunk/LayoutTests/TestExpectations	2015-03-02 23:35:53 UTC (rev 180900)
+++ trunk/LayoutTests/TestExpectations	2015-03-02 23:39:47 UTC (rev 180901)
@@ -97,7 +97,6 @@
 # These tests still mysteriously flake and/or time out.
 webkit.org/b/137131 inspector/debugger [ Skip ]
 webkit.org/b/137130 inspector/replay [ Skip ]
-webkit.org/b/137131 inspector/timeline [ Skip ]
 inspector/model/remote-object-get-properties.html [ Skip ]
 inspector/model/remote-object-weak-collection.html [ Skip ]
 inspector/model/remote-object.html [ Skip ]

Modified: trunk/Source/WebCore/ChangeLog (180900 => 180901)


--- trunk/Source/WebCore/ChangeLog	2015-03-02 23:35:53 UTC (rev 180900)
+++ trunk/Source/WebCore/ChangeLog	2015-03-02 23:39:47 UTC (rev 180901)
@@ -1,3 +1,26 @@
+2015-03-02  Mark Lam  <mark....@apple.com>
+
+        The InspectorTimelineAgent should gracefully handle attempts to start more than once.
+        <https://webkit.org/b/142189>
+
+        Reviewed by Joseph Pecoraro.
+
+        No new tests.  Unskipped an existing test that already asserts this.
+
+        InspectorTimelineAgent::internalStop() already checks for redundant calls to it in
+        case the InspectorTimelineAgent is already disabled. Similarly,
+        InspectorTimelineAgent::internalStart() should check if the InspectorTimelineAgent
+        is already enabled before proceeding to do work to enable it. Though wasteful,
+        it is legal for clients of the InspectorTimelineAgent to invoke start on it more
+        than once. Hence, this check is needed.
+
+        This check fixes the debug assertion failure when running the
+        inspector/timeline/debugger-paused-while-recording.html test. The test can now
+        be unskipped.
+
+        * inspector/InspectorTimelineAgent.cpp:
+        (WebCore::InspectorTimelineAgent::internalStart):
+
 2015-03-02  Roger Fong  <roger_f...@apple.com>
 
         Update backgrounds of sliders for inline media controls on OS X.

Modified: trunk/Source/WebCore/inspector/InspectorTimelineAgent.cpp (180900 => 180901)


--- trunk/Source/WebCore/inspector/InspectorTimelineAgent.cpp	2015-03-02 23:35:53 UTC (rev 180900)
+++ trunk/Source/WebCore/inspector/InspectorTimelineAgent.cpp	2015-03-02 23:39:47 UTC (rev 180901)
@@ -105,6 +105,9 @@
 
 void InspectorTimelineAgent::internalStart(const int* maxCallStackDepth)
 {
+    if (m_enabled)
+        return;
+
     if (maxCallStackDepth && *maxCallStackDepth > 0)
         m_maxCallStackDepth = *maxCallStackDepth;
     else
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to