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

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

Issue 2151273003: [DevTools] Move browser logging from Console domain to Log domain. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@internals-method
Patch Set: protocol improvements Created 4 years, 5 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 a30ac2a04fe99854df9bdff098c2398bdf7cd665..c9a235ae29e5fd1fdaa3176f9aff9cfab7102c84 100644
--- a/third_party/WebKit/Source/platform/v8_inspector/V8RuntimeAgentImpl.cpp
+++ b/third_party/WebKit/Source/platform/v8_inspector/V8RuntimeAgentImpl.cpp
@@ -267,6 +267,12 @@ void V8RuntimeAgentImpl::setCustomObjectFormatterEnabled(ErrorString*, bool enab
m_session->setCustomObjectFormatterEnabled(enabled);
}
+void V8RuntimeAgentImpl::discardConsoleEntries(ErrorString*)
+{
+ V8ConsoleMessageStorage* storage = m_session->debugger()->ensureConsoleMessageStorage(m_session->contextGroupId());
+ storage->clear();
+}
+
void V8RuntimeAgentImpl::compileScript(ErrorString* errorString,
const String16& expression,
const String16& sourceURL,
@@ -369,10 +375,8 @@ void V8RuntimeAgentImpl::enable(ErrorString* errorString)
m_session->debugger()->enableStackCapturingIfNeeded();
m_session->reportAllContexts(this);
V8ConsoleMessageStorage* storage = m_session->debugger()->ensureConsoleMessageStorage(m_session->contextGroupId());
- for (const auto& message : storage->messages()) {
- if (message->origin() != V8MessageOrigin::kExternalConsole)
- reportMessage(message.get(), false);
- }
+ for (const auto& message : storage->messages())
+ reportMessage(message.get(), false);
}
void V8RuntimeAgentImpl::disable(ErrorString* errorString)
@@ -435,7 +439,6 @@ void V8RuntimeAgentImpl::messageAdded(V8ConsoleMessage* message)
void V8RuntimeAgentImpl::reportMessage(V8ConsoleMessage* message, bool generatePreview)
{
- DCHECK(message->origin() != V8MessageOrigin::kExternalConsole);
message->reportToFrontend(&m_frontend, m_session, generatePreview);
m_frontend.flush();
}

Powered by Google App Engine
This is Rietveld 408576698