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

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

Issue 2139363003: [DevTools] Cleanup v8_inspector API part 1. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased 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 d10cff0338ca569c779372c294d210e1ee027fbc..d3fb81674a20f1c1b318e39c310153048daa1291 100644
--- a/third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp
+++ b/third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp
@@ -48,7 +48,6 @@
#include "core/frame/Deprecation.h"
#include "core/frame/LocalDOMWindow.h"
#include "core/inspector/ConsoleMessage.h"
-#include "core/inspector/IdentifiersFactory.h"
#include "core/inspector/InspectorInstrumentation.h"
#include "core/inspector/WorkerInspectorController.h"
#include "core/inspector/WorkerThreadDebugger.h"
@@ -282,21 +281,8 @@ void WorkerGlobalScope::addConsoleMessage(ConsoleMessage* consoleMessage)
void WorkerGlobalScope::addMessageToWorkerConsole(ConsoleMessage* consoleMessage)
{
DCHECK(isContextThread());
- WorkerThreadDebugger* debugger = WorkerThreadDebugger::from(thread()->isolate());
- if (!debugger)
- return;
- debugger->debugger()->addConsoleMessage(
- debugger->contextGroupId(),
- consoleMessage->source(),
- consoleMessage->level(),
- consoleMessage->message(),
- consoleMessage->location()->url(),
- consoleMessage->location()->lineNumber(),
- consoleMessage->location()->columnNumber(),
- consoleMessage->location()->cloneStackTrace(),
- consoleMessage->location()->scriptId(),
- IdentifiersFactory::requestId(consoleMessage->requestIdentifier()),
- consoleMessage->workerId());
+ if (WorkerThreadDebugger* debugger = WorkerThreadDebugger::from(thread()->isolate()))
+ debugger->addConsoleMessage(consoleMessage);
}
bool WorkerGlobalScope::isContextThread() const

Powered by Google App Engine
This is Rietveld 408576698