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

Unified Diff: Source/core/inspector/InspectorConsoleMessage.cpp

Issue 466753002: DevTools: Do not push to frontend messages from worker while it is alive (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix test Created 6 years, 4 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 | « Source/core/inspector/InspectorConsoleMessage.h ('k') | Source/core/inspector/InspectorInstrumentation.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/InspectorConsoleMessage.cpp
diff --git a/Source/core/inspector/InspectorConsoleMessage.cpp b/Source/core/inspector/InspectorConsoleMessage.cpp
index 409e5fa10a97f0d9eead5dbb0f8a81d707a828d8..4a862275f462993055ee947269d3bf2fcafc0838 100644
--- a/Source/core/inspector/InspectorConsoleMessage.cpp
+++ b/Source/core/inspector/InspectorConsoleMessage.cpp
@@ -56,6 +56,7 @@ InspectorConsoleMessage::InspectorConsoleMessage(MessageSource source, MessageTy
, m_column(0)
, m_requestId(IdentifiersFactory::requestId(0))
, m_timestamp(WTF::currentTime())
+ , m_workerProxy(nullptr)
{
autogenerateMetadata();
}
@@ -71,6 +72,7 @@ InspectorConsoleMessage::InspectorConsoleMessage(bool shouldGenerateCallStack, M
, m_column(column)
, m_requestId(IdentifiersFactory::requestId(requestIdentifier))
, m_timestamp(WTF::currentTime())
+ , m_workerProxy(nullptr)
{
autogenerateMetadata(shouldGenerateCallStack);
}
@@ -87,6 +89,7 @@ InspectorConsoleMessage::InspectorConsoleMessage(MessageSource source, MessageTy
, m_column(0)
, m_requestId(IdentifiersFactory::requestId(requestIdentifier))
, m_timestamp(WTF::currentTime())
+ , m_workerProxy(nullptr)
{
autogenerateMetadata(false);
}
@@ -103,6 +106,7 @@ InspectorConsoleMessage::InspectorConsoleMessage(MessageSource source, MessageTy
, m_column(0)
, m_requestId(IdentifiersFactory::requestId(requestIdentifier))
, m_timestamp(WTF::currentTime())
+ , m_workerProxy(nullptr)
{
autogenerateMetadata();
}
@@ -179,6 +183,9 @@ static TypeBuilder::Console::ConsoleMessage::Level::Enum messageLevelValue(Messa
void InspectorConsoleMessage::addToFrontend(InspectorFrontend::Console* frontend, InjectedScriptManager* injectedScriptManager, bool generatePreview)
{
+ if (m_workerProxy)
+ return;
+
RefPtr<TypeBuilder::Console::ConsoleMessage> jsonObj = TypeBuilder::Console::ConsoleMessage::create()
.setSource(messageSourceValue(m_source))
.setLevel(messageLevelValue(m_level))
« no previous file with comments | « Source/core/inspector/InspectorConsoleMessage.h ('k') | Source/core/inspector/InspectorInstrumentation.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698