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

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

Issue 2372093002: [inspector] fixed console.count with empty stack (Closed)
Patch Set: Created 4 years, 3 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 | no next file » | 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 96537951a46ed3e19bfdf7ee344f7bd3fa3056fd..eab4051c548ea86b487e9206d598bd685406c3ad 100644
--- a/src/inspector/v8-console.cc
+++ b/src/inspector/v8-console.cc
@@ -344,9 +344,10 @@ void V8Console::countCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
if (title.isEmpty()) {
std::unique_ptr<V8StackTraceImpl> stackTrace =
V8StackTraceImpl::capture(nullptr, 0, 1);
- if (stackTrace)
+ if (stackTrace && !stackTrace->isEmpty()) {
identifier = toString16(stackTrace->topSourceURL()) + ":" +
String16::fromInteger(stackTrace->topLineNumber());
+ }
} else {
identifier = title + "@";
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698