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

Unified Diff: src/inspector/V8ConsoleAgentImpl.cpp

Issue 2323173004: [inspector] handle context destroyed after console.log (Closed)
Patch Set: fix formatting 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
« no previous file with comments | « src/inspector/V8ConsoleAgentImpl.h ('k') | src/inspector/V8ConsoleMessage.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/inspector/V8ConsoleAgentImpl.cpp
diff --git a/src/inspector/V8ConsoleAgentImpl.cpp b/src/inspector/V8ConsoleAgentImpl.cpp
index 02e0b6c6e1ca29f55e2e13618a5fe23db0763823..9e35cffe6174ae3057f46ff73017b8a591e3297d 100644
--- a/src/inspector/V8ConsoleAgentImpl.cpp
+++ b/src/inspector/V8ConsoleAgentImpl.cpp
@@ -61,16 +61,19 @@ void V8ConsoleAgentImpl::reportAllMessages() {
m_session->inspector()->ensureConsoleMessageStorage(
m_session->contextGroupId());
for (const auto& message : storage->messages()) {
- if (message->origin() == V8MessageOrigin::kConsole)
- reportMessage(message.get(), false);
+ if (message->origin() == V8MessageOrigin::kConsole) {
+ if (!reportMessage(message.get(), false)) return;
+ }
}
}
-void V8ConsoleAgentImpl::reportMessage(V8ConsoleMessage* message,
+bool V8ConsoleAgentImpl::reportMessage(V8ConsoleMessage* message,
bool generatePreview) {
DCHECK(message->origin() == V8MessageOrigin::kConsole);
message->reportToFrontend(&m_frontend);
m_frontend.flush();
+ return m_session->inspector()->hasConsoleMessageStorage(
+ m_session->contextGroupId());
}
} // namespace v8_inspector
« no previous file with comments | « src/inspector/V8ConsoleAgentImpl.h ('k') | src/inspector/V8ConsoleMessage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698