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

Unified Diff: third_party/WebKit/Source/core/inspector/InspectorRuntimeAgent.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/core/inspector/InspectorRuntimeAgent.cpp
diff --git a/third_party/WebKit/Source/core/inspector/InspectorRuntimeAgent.cpp b/third_party/WebKit/Source/core/inspector/InspectorRuntimeAgent.cpp
index 2b51c94cda16f5247458aad12c6c544794acbe29..88a393912286b9f934b159a83d19a2270ab71e56 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorRuntimeAgent.cpp
+++ b/third_party/WebKit/Source/core/inspector/InspectorRuntimeAgent.cpp
@@ -39,13 +39,8 @@
namespace blink {
-namespace InspectorRuntimeAgentState {
-static const char runtimeEnabled[] = "runtimeEnabled";
-};
-
InspectorRuntimeAgent::InspectorRuntimeAgent(V8RuntimeAgent* agent)
: InspectorBaseAgent<InspectorRuntimeAgent, protocol::Frontend::Runtime>("Runtime")
- , m_enabled(false)
, m_v8RuntimeAgent(agent)
{
}
@@ -70,11 +65,7 @@ void InspectorRuntimeAgent::dispose()
void InspectorRuntimeAgent::restore()
{
- if (!m_state->booleanProperty(InspectorRuntimeAgentState::runtimeEnabled, false))
- return;
m_v8RuntimeAgent->restore();
- ErrorString errorString;
- enable(&errorString);
}
void InspectorRuntimeAgent::evaluate(ErrorString* errorString,
@@ -166,21 +157,11 @@ void InspectorRuntimeAgent::runScript(ErrorString* errorString,
void InspectorRuntimeAgent::enable(ErrorString* errorString)
{
- if (m_enabled)
- return;
-
- m_enabled = true;
- m_state->setBoolean(InspectorRuntimeAgentState::runtimeEnabled, true);
m_v8RuntimeAgent->enable(errorString);
}
void InspectorRuntimeAgent::disable(ErrorString* errorString)
{
- if (!m_enabled)
- return;
-
- m_enabled = false;
- m_state->setBoolean(InspectorRuntimeAgentState::runtimeEnabled, false);
m_v8RuntimeAgent->disable(errorString);
}

Powered by Google App Engine
This is Rietveld 408576698