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

Unified Diff: src/inspector/v8-console.cc

Issue 2656613004: V8 Inspector: remove V8ConsoleAPIType from the API, reuse v8::Isolate::MessageErrorLevel instead. (Closed)
Patch Set: rebaselined the test 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 | « src/inspector/js_protocol.json ('k') | src/inspector/v8-console-message.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/inspector/v8-console.cc
diff --git a/src/inspector/v8-console.cc b/src/inspector/v8-console.cc
index e33e25a80deb3efc54f171d92216acf5bac2f1bf..8824b9fc62cc884e9846b6f64916db148c670305 100644
--- a/src/inspector/v8-console.cc
+++ b/src/inspector/v8-console.cc
@@ -336,8 +336,14 @@ void V8Console::groupEndCallback(
}
void V8Console::clearCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
- ConsoleHelper(info).reportCallWithDefaultArgument(ConsoleAPIType::kClear,
- String16("console.clear"));
+ ConsoleHelper helper(info);
+ InspectedContext* context = helper.ensureInspectedContext();
+ if (!context) return;
+ int contextGroupId = context->contextGroupId();
+ if (V8InspectorClient* client = helper.ensureDebuggerClient())
+ client->consoleClear(contextGroupId);
+ helper.reportCallWithDefaultArgument(ConsoleAPIType::kClear,
+ String16("console.clear"));
}
void V8Console::countCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
« no previous file with comments | « src/inspector/js_protocol.json ('k') | src/inspector/v8-console-message.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698