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

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

Issue 1967933002: [DevTools] Dispatch messages to V8InspectorSession directly. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@1936593002
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/V8RuntimeAgentImpl.cpp
diff --git a/third_party/WebKit/Source/platform/v8_inspector/V8RuntimeAgentImpl.cpp b/third_party/WebKit/Source/platform/v8_inspector/V8RuntimeAgentImpl.cpp
index 0ec37796970817821d0b8e6f649f9317fc83b0f7..5727f8e847aa2fae9ba9653ffe401e48bb734334 100644
--- a/third_party/WebKit/Source/platform/v8_inspector/V8RuntimeAgentImpl.cpp
+++ b/third_party/WebKit/Source/platform/v8_inspector/V8RuntimeAgentImpl.cpp
@@ -56,10 +56,10 @@ static bool hasInternalError(ErrorString* errorString, bool hasError)
return hasError;
}
-V8RuntimeAgentImpl::V8RuntimeAgentImpl(V8InspectorSessionImpl* session)
+V8RuntimeAgentImpl::V8RuntimeAgentImpl(V8InspectorSessionImpl* session, protocol::Frontend::Runtime* frontend, protocol::DictionaryValue* state)
: m_session(session)
- , m_state(nullptr)
- , m_frontend(nullptr)
+ , m_state(state)
+ , m_frontend(frontend)
, m_debugger(session->debugger())
, m_enabled(false)
{
@@ -343,24 +343,6 @@ void V8RuntimeAgentImpl::runScript(ErrorString* errorString,
scope.injectedScript()->wrapEvaluateResult(errorString, maybeResultValue, scope.tryCatch(), objectGroup.fromMaybe(""), false, false, result, nullptr, exceptionDetails);
}
-void V8RuntimeAgentImpl::setInspectorState(protocol::DictionaryValue* state)
-{
- m_state = state;
-}
-
-void V8RuntimeAgentImpl::setFrontend(protocol::Frontend::Runtime* frontend)
-{
- m_frontend = frontend;
-}
-
-void V8RuntimeAgentImpl::clearFrontend()
-{
- ErrorString error;
- disable(&error);
- DCHECK(m_frontend);
- m_frontend = nullptr;
-}
-
void V8RuntimeAgentImpl::restore()
{
if (!m_state->booleanProperty(V8RuntimeAgentImplState::runtimeEnabled, false))

Powered by Google App Engine
This is Rietveld 408576698