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

Unified Diff: third_party/WebKit/Source/platform/v8_inspector/V8DebuggerAgentImpl.cpp

Issue 1936593002: [DevTools] Remove state from v8 agent wrappers, remove unnecessary classes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove-everything-from-agents
Patch Set: rebased Created 4 years, 7 months 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
Index: third_party/WebKit/Source/platform/v8_inspector/V8DebuggerAgentImpl.cpp
diff --git a/third_party/WebKit/Source/platform/v8_inspector/V8DebuggerAgentImpl.cpp b/third_party/WebKit/Source/platform/v8_inspector/V8DebuggerAgentImpl.cpp
index 0b53f67c2e8667307d993b8b441f826ac10faa29..5099b241e0b6c45b4abf08e1b2356c01c62ce3b9 100644
--- a/third_party/WebKit/Source/platform/v8_inspector/V8DebuggerAgentImpl.cpp
+++ b/third_party/WebKit/Source/platform/v8_inspector/V8DebuggerAgentImpl.cpp
@@ -46,6 +46,7 @@ static const char javaScriptBreakpoints[] = "javaScriptBreakopints";
static const char pauseOnExceptionsState[] = "pauseOnExceptionsState";
static const char asyncCallStackDepth[] = "asyncCallStackDepth";
static const char blackboxPattern[] = "blackboxPattern";
+static const char debuggerEnabled[] = "debuggerEnabled";
// Breakpoint properties.
static const char url[] = "url";
@@ -193,6 +194,7 @@ void V8DebuggerAgentImpl::enable()
// debugger().addListener may result in reporting all parsed scripts to
// the agent so it should already be in enabled state by then.
m_enabled = true;
+ m_state->setBoolean(DebuggerAgentState::debuggerEnabled, true);
debugger().debuggerAgentEnabled();
protocol::Vector<V8DebuggerParsedScript> compiledScripts;
@@ -254,9 +256,10 @@ void V8DebuggerAgentImpl::disable(ErrorString*)
m_skippedStepFrameCount = 0;
m_recursionLevelForStepFrame = 0;
m_skipAllPauses = false;
- m_enabled = false;
m_blackboxPattern = nullptr;
m_state->remove(DebuggerAgentState::blackboxPattern);
+ m_enabled = false;
+ m_state->setBoolean(DebuggerAgentState::debuggerEnabled, false);
}
void V8DebuggerAgentImpl::internalSetAsyncCallStackDepth(int depth)
@@ -285,6 +288,8 @@ void V8DebuggerAgentImpl::clearFrontend()
void V8DebuggerAgentImpl::restore()
{
ASSERT(!m_enabled);
+ if (!m_state->booleanProperty(DebuggerAgentState::debuggerEnabled, false))
+ return;
if (!m_session->client()->canExecuteScripts())
return;

Powered by Google App Engine
This is Rietveld 408576698