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

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

Issue 2674583002: [inspector] added missing test for console methods (Closed)
Patch Set: rebased 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 | « no previous file | test/inspector/runtime/console-methods.js » ('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 8824b9fc62cc884e9846b6f64916db148c670305..cfe7fc1532c972d262bab12f022ab729ef66ffeb 100644
--- a/src/inspector/v8-console.cc
+++ b/src/inspector/v8-console.cc
@@ -366,8 +366,10 @@ void V8Console::countCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
if (!helper.privateMap("V8Console#countMap").ToLocal(&countMap)) return;
int32_t count = helper.getIntFromMap(countMap, identifier, 0) + 1;
helper.setIntOnMap(countMap, identifier, count);
- helper.reportCallWithArgument(ConsoleAPIType::kCount,
- title + ": " + String16::fromInteger(count));
+ String16 countString = String16::fromInteger(count);
+ helper.reportCallWithArgument(
+ ConsoleAPIType::kCount,
+ title.isEmpty() ? countString : (title + ": " + countString));
}
void V8Console::assertCallback(
« no previous file with comments | « no previous file | test/inspector/runtime/console-methods.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698