| Index: third_party/WebKit/Source/core/inspector/MainThreadDebugger.cpp
|
| diff --git a/third_party/WebKit/Source/core/inspector/MainThreadDebugger.cpp b/third_party/WebKit/Source/core/inspector/MainThreadDebugger.cpp
|
| index 68399b5eeacd312220041b86418842008f0e9a7f..ef59b8bacff11cd96721c518ad11b1eee6219285 100644
|
| --- a/third_party/WebKit/Source/core/inspector/MainThreadDebugger.cpp
|
| +++ b/third_party/WebKit/Source/core/inspector/MainThreadDebugger.cpp
|
| @@ -301,7 +301,7 @@ void MainThreadDebugger::runIfWaitingForDebugger(int contextGroupId) {
|
|
|
| void MainThreadDebugger::consoleAPIMessage(
|
| int contextGroupId,
|
| - v8_inspector::V8ConsoleAPIType type,
|
| + v8::Isolate::MessageErrorLevel level,
|
| const v8_inspector::StringView& message,
|
| const v8_inspector::StringView& url,
|
| unsigned lineNumber,
|
| @@ -310,18 +310,24 @@ void MainThreadDebugger::consoleAPIMessage(
|
| LocalFrame* frame = WeakIdentifierMap<LocalFrame>::lookup(contextGroupId);
|
| if (!frame)
|
| return;
|
| - if (type == v8_inspector::V8ConsoleAPIType::kClear && frame->host())
|
| - frame->host()->consoleMessageStorage().clear();
|
| // TODO(dgozman): we can save a copy of message and url here by making
|
| // FrameConsole work with StringView.
|
| std::unique_ptr<SourceLocation> location =
|
| SourceLocation::create(toCoreString(url), lineNumber, columnNumber,
|
| stackTrace ? stackTrace->clone() : nullptr, 0);
|
| frame->console().reportMessageToClient(ConsoleAPIMessageSource,
|
| - consoleAPITypeToMessageLevel(type),
|
| + v8MessageLevelToMessageLevel(level),
|
| toCoreString(message), location.get());
|
| }
|
|
|
| +void MainThreadDebugger::consoleClear(int contextGroupId) {
|
| + LocalFrame* frame = WeakIdentifierMap<LocalFrame>::lookup(contextGroupId);
|
| + if (!frame)
|
| + return;
|
| + if (frame->host())
|
| + frame->host()->consoleMessageStorage().clear();
|
| +}
|
| +
|
| v8::MaybeLocal<v8::Value> MainThreadDebugger::memoryInfo(
|
| v8::Isolate* isolate,
|
| v8::Local<v8::Context> context) {
|
|
|