Title: [178433] trunk/Source/_javascript_Core
Revision
178433
Author
[email protected]
Date
2015-01-14 11:42:00 -0800 (Wed, 14 Jan 2015)

Log Message

Web Inspector: Stopwatch ASSERT when continuing inspector
https://bugs.webkit.org/show_bug.cgi?id=138360

Reviewed by Timothy Hatcher.

We were unconditionally resuming the stopwatch even if we never
paused it in the first place. Maintain a flag for whether the
stopwatch was paused when the debugger last paused.

* inspector/agents/InspectorDebuggerAgent.cpp:
(Inspector::InspectorDebuggerAgent::didPause):
(Inspector::InspectorDebuggerAgent::didContinue):
* inspector/agents/InspectorDebuggerAgent.h:

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (178432 => 178433)


--- trunk/Source/_javascript_Core/ChangeLog	2015-01-14 19:38:21 UTC (rev 178432)
+++ trunk/Source/_javascript_Core/ChangeLog	2015-01-14 19:42:00 UTC (rev 178433)
@@ -1,3 +1,19 @@
+2015-01-14  Brian J. Burg  <[email protected]>
+
+        Web Inspector: Stopwatch ASSERT when continuing inspector
+        https://bugs.webkit.org/show_bug.cgi?id=138360
+
+        Reviewed by Timothy Hatcher.
+
+        We were unconditionally resuming the stopwatch even if we never
+        paused it in the first place. Maintain a flag for whether the
+        stopwatch was paused when the debugger last paused.
+
+        * inspector/agents/InspectorDebuggerAgent.cpp:
+        (Inspector::InspectorDebuggerAgent::didPause):
+        (Inspector::InspectorDebuggerAgent::didContinue):
+        * inspector/agents/InspectorDebuggerAgent.h:
+
 2015-01-14  Michael Saboff  <[email protected]>
 
         REGRESSION (r174226): Header on huffingtonpost.com is too large

Modified: trunk/Source/_javascript_Core/inspector/agents/InspectorDebuggerAgent.cpp (178432 => 178433)


--- trunk/Source/_javascript_Core/inspector/agents/InspectorDebuggerAgent.cpp	2015-01-14 19:38:21 UTC (rev 178432)
+++ trunk/Source/_javascript_Core/inspector/agents/InspectorDebuggerAgent.cpp	2015-01-14 19:42:00 UTC (rev 178433)
@@ -715,8 +715,10 @@
         m_listener->didPause();
 
     RefPtr<Stopwatch> stopwatch = m_injectedScriptManager->inspectorEnvironment().executionStopwatch();
-    if (stopwatch && stopwatch->isActive())
+    if (stopwatch && stopwatch->isActive()) {
         stopwatch->stop();
+        m_didPauseStopwatch = true;
+    }
 }
 
 void InspectorDebuggerAgent::breakpointActionSound(int breakpointActionIdentifier)
@@ -741,10 +743,14 @@
 
 void InspectorDebuggerAgent::didContinue()
 {
+    if (m_didPauseStopwatch) {
+        m_didPauseStopwatch = false;
+        m_injectedScriptManager->inspectorEnvironment().executionStopwatch()->start();
+    }
+
     m_pausedScriptState = nullptr;
     m_currentCallStack = Deprecated::ScriptValue();
     m_injectedScriptManager->releaseObjectGroup(InspectorDebuggerAgent::backtraceObjectGroup);
-    m_injectedScriptManager->inspectorEnvironment().executionStopwatch()->start();
     clearBreakDetails();
     clearExceptionValue();
 

Modified: trunk/Source/_javascript_Core/inspector/agents/InspectorDebuggerAgent.h (178432 => 178433)


--- trunk/Source/_javascript_Core/inspector/agents/InspectorDebuggerAgent.h	2015-01-14 19:38:21 UTC (rev 178432)
+++ trunk/Source/_javascript_Core/inspector/agents/InspectorDebuggerAgent.h	2015-01-14 19:42:00 UTC (rev 178433)
@@ -172,6 +172,7 @@
     bool m_enabled {false};
     bool m_javaScriptPauseScheduled {false};
     bool m_hasExceptionValue {false};
+    bool m_didPauseStopwatch {false};
     RefPtr<WTF::Stopwatch> m_stopwatch;
 };
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to