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

Unified Diff: third_party/WebKit/Source/core/workers/InProcessWorkerMessagingProxy.cpp

Issue 2003433004: Remove dependency from ConsoleMessage to workers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@1999463002
Patch Set: messageN Created 4 years, 7 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/InProcessWorkerMessagingProxy.cpp
diff --git a/third_party/WebKit/Source/core/workers/InProcessWorkerMessagingProxy.cpp b/third_party/WebKit/Source/core/workers/InProcessWorkerMessagingProxy.cpp
index ab6286cb7238d73c9b0e2c1de989a36adef84353..5204c70567fb95ed7a9849caf1515446d87bca65 100644
--- a/third_party/WebKit/Source/core/workers/InProcessWorkerMessagingProxy.cpp
+++ b/third_party/WebKit/Source/core/workers/InProcessWorkerMessagingProxy.cpp
@@ -180,15 +180,8 @@ void InProcessWorkerMessagingProxy::reportConsoleMessage(MessageSource source, M
DCHECK(isParentContextThread());
if (m_askedToTerminate)
return;
-
- Document* document = toDocument(getExecutionContext());
- LocalFrame* frame = document->frame();
- if (!frame)
- return;
-
- ConsoleMessage* consoleMessage = ConsoleMessage::create(source, level, message, sourceURL, lineNumber, 0);
- consoleMessage->setWorkerInspectorProxy(m_workerInspectorProxy.get());
- frame->console().addMessage(consoleMessage);
+ if (m_workerInspectorProxy)
+ m_workerInspectorProxy->addConsoleMessageFromWorker(ConsoleMessage::create(source, level, message, sourceURL, lineNumber, 0));
}
void InProcessWorkerMessagingProxy::workerThreadCreated()
@@ -297,11 +290,6 @@ void InProcessWorkerMessagingProxy::terminateInternally()
{
DCHECK(isParentContextThread());
m_workerInspectorProxy->workerThreadTerminated();
-
- Document* document = toDocument(getExecutionContext());
- LocalFrame* frame = document->frame();
- if (frame)
- frame->console().adoptWorkerMessagesAfterTermination(m_workerInspectorProxy.get());
}
bool InProcessWorkerMessagingProxy::isParentContextThread() const

Powered by Google App Engine
This is Rietveld 408576698