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

Unified Diff: Source/core/workers/WorkerGlobalScope.cpp

Issue 464293002: [DevTools] ConsoleMessage storage moved from ConsoleAgent (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@remove-can-generate
Patch Set: 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/workers/WorkerGlobalScope.h ('k') | Source/core/workers/WorkerMessagingProxy.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/workers/WorkerGlobalScope.cpp
diff --git a/Source/core/workers/WorkerGlobalScope.cpp b/Source/core/workers/WorkerGlobalScope.cpp
index 09a10d03ac2aa0bc918d9ab4ea2de062701a3e89..8d74fc06313d67613326a5887adc4fd6fc14e7cd 100644
--- a/Source/core/workers/WorkerGlobalScope.cpp
+++ b/Source/core/workers/WorkerGlobalScope.cpp
@@ -41,6 +41,7 @@
#include "core/events/ErrorEvent.h"
#include "core/events/Event.h"
#include "core/inspector/ConsoleMessage.h"
+#include "core/inspector/ConsoleMessageStorage.h"
#include "core/inspector/InspectorConsoleInstrumentation.h"
#include "core/inspector/ScriptCallStack.h"
#include "core/inspector/WorkerInspectorController.h"
@@ -89,6 +90,7 @@ WorkerGlobalScope::WorkerGlobalScope(const KURL& url, const String& userAgent, W
, m_workerClients(workerClients)
, m_timeOrigin(timeOrigin)
, m_terminationObserver(0)
+ , m_messageStorage(ConsoleMessageStorage::createForWorker(this))
{
ScriptWrappable::init(this);
setClient(this);
@@ -306,7 +308,7 @@ void WorkerGlobalScope::addMessage(PassRefPtrWillBeRawPtr<ConsoleMessage> prpCon
void WorkerGlobalScope::addMessageToWorkerConsole(PassRefPtrWillBeRawPtr<ConsoleMessage> consoleMessage)
{
ASSERT(isContextThread());
- InspectorInstrumentation::addMessageToConsole(this, consoleMessage.get());
+ m_messageStorage->reportMessage(consoleMessage);
}
bool WorkerGlobalScope::isContextThread() const
@@ -339,6 +341,11 @@ void WorkerGlobalScope::countDeprecation(UseCounter::Feature) const
// FIXME: How should we count features for shared/service workers?
}
+ConsoleMessageStorage* WorkerGlobalScope::messageStorage()
+{
+ return m_messageStorage.get();
+}
+
void WorkerGlobalScope::trace(Visitor* visitor)
{
visitor->trace(m_console);
« no previous file with comments | « Source/core/workers/WorkerGlobalScope.h ('k') | Source/core/workers/WorkerMessagingProxy.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698