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

Unified Diff: third_party/WebKit/Source/core/inspector/WorkerThreadDebugger.cpp

Issue 2656633004: DevTools: migrate v8 console client to the new API. (Closed)
Patch Set: rebaselined Created 3 years, 11 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 | « third_party/WebKit/Source/core/inspector/WorkerThreadDebugger.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/inspector/WorkerThreadDebugger.cpp
diff --git a/third_party/WebKit/Source/core/inspector/WorkerThreadDebugger.cpp b/third_party/WebKit/Source/core/inspector/WorkerThreadDebugger.cpp
index 12752767d42bd630c64b44281d788b057f0f1ed5..55707d7184ffaedfce3e3ce752befb4173648ecd 100644
--- a/third_party/WebKit/Source/core/inspector/WorkerThreadDebugger.cpp
+++ b/third_party/WebKit/Source/core/inspector/WorkerThreadDebugger.cpp
@@ -194,7 +194,7 @@ void WorkerThreadDebugger::runIfWaitingForDebugger(int contextGroupId) {
void WorkerThreadDebugger::consoleAPIMessage(
int contextGroupId,
- v8_inspector::V8ConsoleAPIType type,
+ v8::Isolate::MessageErrorLevel level,
const v8_inspector::StringView& message,
const v8_inspector::StringView& url,
unsigned lineNumber,
@@ -202,17 +202,20 @@ void WorkerThreadDebugger::consoleAPIMessage(
v8_inspector::V8StackTrace* stackTrace) {
DCHECK(m_workerThreads.contains(contextGroupId));
WorkerThread* workerThread = m_workerThreads.get(contextGroupId);
-
- if (type == v8_inspector::V8ConsoleAPIType::kClear)
- workerThread->consoleMessageStorage()->clear();
std::unique_ptr<SourceLocation> location =
SourceLocation::create(toCoreString(url), lineNumber, columnNumber,
stackTrace ? stackTrace->clone() : nullptr, 0);
workerThread->workerReportingProxy().reportConsoleMessage(
- ConsoleAPIMessageSource, consoleAPITypeToMessageLevel(type),
+ ConsoleAPIMessageSource, v8MessageLevelToMessageLevel(level),
toCoreString(message), location.get());
}
+void WorkerThreadDebugger::consoleClear(int contextGroupId) {
+ DCHECK(m_workerThreads.contains(contextGroupId));
+ WorkerThread* workerThread = m_workerThreads.get(contextGroupId);
+ workerThread->consoleMessageStorage()->clear();
+}
+
v8::MaybeLocal<v8::Value> WorkerThreadDebugger::memoryInfo(
v8::Isolate*,
v8::Local<v8::Context>) {
« no previous file with comments | « third_party/WebKit/Source/core/inspector/WorkerThreadDebugger.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698