Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(785)

Unified Diff: Source/core/inspector/InspectorDebuggerAgent.cpp

Issue 111543005: DevTools: Restore capture async traces state on page navigation. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebased Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/InspectorDebuggerAgent.cpp
diff --git a/Source/core/inspector/InspectorDebuggerAgent.cpp b/Source/core/inspector/InspectorDebuggerAgent.cpp
index 9e9f336eba9cc69539965a93738b5bc298119a99..9f66b2be4d98b210f35836587658d582d9d42061 100644
--- a/Source/core/inspector/InspectorDebuggerAgent.cpp
+++ b/Source/core/inspector/InspectorDebuggerAgent.cpp
@@ -61,6 +61,7 @@ namespace DebuggerAgentState {
static const char debuggerEnabled[] = "debuggerEnabled";
static const char javaScriptBreakpoints[] = "javaScriptBreakopints";
static const char pauseOnExceptionsState[] = "pauseOnExceptionsState";
+static const char asyncCallStackDepth[] = "asyncCallStackDepth";
// Breakpoint properties.
static const char url[] = "url";
@@ -134,6 +135,7 @@ void InspectorDebuggerAgent::disable()
m_state->setObject(DebuggerAgentState::javaScriptBreakpoints, JSONObject::create());
m_state->setLong(DebuggerAgentState::pauseOnExceptionsState, ScriptDebugServer::DontPauseOnExceptions);
m_state->setString(DebuggerAgentState::skipStackPattern, "");
+ m_state->setLong(DebuggerAgentState::asyncCallStackDepth, 0);
m_instrumentingAgents->setInspectorDebuggerAgent(0);
stopListeningScriptDebugServer();
@@ -196,6 +198,7 @@ void InspectorDebuggerAgent::restore()
m_skipAllPauses = false;
m_state->setBoolean(DebuggerAgentState::skipAllPauses, false);
}
+ m_asyncCallStackTracker.setAsyncCallStackDepth(m_state->getLong(DebuggerAgentState::asyncCallStackDepth));
}
}
@@ -931,6 +934,7 @@ void InspectorDebuggerAgent::skipStackFrames(ErrorString* errorString, const Str
void InspectorDebuggerAgent::setAsyncCallStackDepth(ErrorString*, int depth)
{
+ m_state->setLong(DebuggerAgentState::asyncCallStackDepth, depth);
m_asyncCallStackTracker.setAsyncCallStackDepth(depth);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698