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

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

Issue 2318853002: [DevTools] Handle navigation in console.log (Closed)
Patch Set: addressed comments Created 4 years, 3 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 5c8c7845a3d430fe754cf6a1a03e53124ced17bf..64053c4059e7a49032dc4e03c5c4817eb671a180 100644
--- a/third_party/WebKit/Source/platform/v8_inspector/V8RuntimeAgentImpl.cpp
+++ b/third_party/WebKit/Source/platform/v8_inspector/V8RuntimeAgentImpl.cpp
@@ -617,8 +617,10 @@ void V8RuntimeAgentImpl::enable(ErrorString* errorString)
m_inspector->enableStackCapturingIfNeeded();
m_session->reportAllContexts(this);
V8ConsoleMessageStorage* storage = m_inspector->ensureConsoleMessageStorage(m_session->contextGroupId());
- for (const auto& message : storage->messages())
- reportMessage(message.get(), false);
+ for (const auto& message : storage->messages()) {
+ if (!reportMessage(message.get(), false))
+ return;
+ }
}
void V8RuntimeAgentImpl::disable(ErrorString* errorString)
@@ -679,10 +681,11 @@ void V8RuntimeAgentImpl::messageAdded(V8ConsoleMessage* message)
reportMessage(message, true);
}
-void V8RuntimeAgentImpl::reportMessage(V8ConsoleMessage* message, bool generatePreview)
+bool V8RuntimeAgentImpl::reportMessage(V8ConsoleMessage* message, bool generatePreview)
{
message->reportToFrontend(&m_frontend, m_session, generatePreview);
m_frontend.flush();
+ return m_inspector->hasConsoleMessageStorage(m_session->contextGroupId());
}
} // namespace v8_inspector

Powered by Google App Engine
This is Rietveld 408576698