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

Unified Diff: third_party/WebKit/Source/core/workers/WorkerGlobalScope.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/core/workers/WorkerGlobalScope.cpp
diff --git a/third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp b/third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp
index 6000131f69dae4b9b27da3483f5b12cff1948179..b28599cf51da7eccb63ba592cb13fe9d573fd0bb 100644
--- a/third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp
+++ b/third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp
@@ -41,6 +41,7 @@
#include "core/frame/DOMTimerCoordinator.h"
#include "core/frame/Deprecation.h"
#include "core/inspector/ConsoleMessage.h"
+#include "core/inspector/ConsoleMessageStorage.h"
#include "core/inspector/InspectorInstrumentation.h"
#include "core/inspector/WorkerInspectorController.h"
#include "core/inspector/WorkerThreadDebugger.h"
@@ -298,6 +299,7 @@ WorkerGlobalScope::WorkerGlobalScope(const KURL& url, const String& userAgent, W
, m_workerClients(workerClients)
, m_timers(Platform::current()->currentThread()->scheduler()->timerTaskRunner()->adoptClone())
, m_timeOrigin(timeOrigin)
+ , m_consoleMessageStorage(new ConsoleMessageStorage())
{
setSecurityOrigin(SecurityOrigin::create(url));
if (starterOriginPrivilageData)
@@ -321,8 +323,7 @@ void WorkerGlobalScope::applyContentSecurityPolicyFromVector(const Vector<CSPHea
void WorkerGlobalScope::addMessageToWorkerConsole(ConsoleMessage* consoleMessage)
{
DCHECK(isContextThread());
- if (WorkerThreadDebugger* debugger = WorkerThreadDebugger::from(thread()->isolate()))
- debugger->addConsoleMessage(consoleMessage);
+ m_consoleMessageStorage->addConsoleMessage(this, consoleMessage);
}
void WorkerGlobalScope::exceptionThrown(const String& errorMessage, std::unique_ptr<SourceLocation> location)
@@ -364,6 +365,7 @@ DEFINE_TRACE(WorkerGlobalScope)
visitor->trace(m_eventQueue);
visitor->trace(m_workerClients);
visitor->trace(m_timers);
+ visitor->trace(m_consoleMessageStorage);
visitor->trace(m_eventListeners);
ExecutionContext::trace(visitor);
EventTargetWithInlineData::trace(visitor);

Powered by Google App Engine
This is Rietveld 408576698