| OLD | NEW |
| 1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/inspector/v8-console.h" | 5 #include "src/inspector/v8-console.h" |
| 6 | 6 |
| 7 #include "src/base/macros.h" | 7 #include "src/base/macros.h" |
| 8 #include "src/inspector/injected-script.h" | 8 #include "src/inspector/injected-script.h" |
| 9 #include "src/inspector/inspected-context.h" | 9 #include "src/inspector/inspected-context.h" |
| 10 #include "src/inspector/string-util.h" | 10 #include "src/inspector/string-util.h" |
| (...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 256 helper.reportCallWithDefaultArgument(ConsoleAPIType::kClear, | 256 helper.reportCallWithDefaultArgument(ConsoleAPIType::kClear, |
| 257 String16("console.clear")); | 257 String16("console.clear")); |
| 258 } | 258 } |
| 259 | 259 |
| 260 void V8Console::countCallback(const v8::FunctionCallbackInfo<v8::Value>& info) { | 260 void V8Console::countCallback(const v8::FunctionCallbackInfo<v8::Value>& info) { |
| 261 ConsoleHelper helper(info, m_inspector); | 261 ConsoleHelper helper(info, m_inspector); |
| 262 String16 title = helper.firstArgToString(String16()); | 262 String16 title = helper.firstArgToString(String16()); |
| 263 String16 identifier; | 263 String16 identifier; |
| 264 if (title.isEmpty()) { | 264 if (title.isEmpty()) { |
| 265 std::unique_ptr<V8StackTraceImpl> stackTrace = | 265 std::unique_ptr<V8StackTraceImpl> stackTrace = |
| 266 V8StackTraceImpl::capture(m_inspector->debugger(), helper.groupId(), 1); | 266 V8StackTraceImpl::capture(m_inspector->debugger(), 0, 1); |
| 267 if (stackTrace && !stackTrace->isEmpty()) { | 267 if (stackTrace && !stackTrace->isEmpty()) { |
| 268 identifier = toString16(stackTrace->topSourceURL()) + ":" + | 268 identifier = toString16(stackTrace->topSourceURL()) + ":" + |
| 269 String16::fromInteger(stackTrace->topLineNumber()); | 269 String16::fromInteger(stackTrace->topLineNumber()); |
| 270 } | 270 } |
| 271 } else { | 271 } else { |
| 272 identifier = title + "@"; | 272 identifier = title + "@"; |
| 273 } | 273 } |
| 274 | 274 |
| 275 int count = | 275 int count = |
| 276 helper.consoleMessageStorage()->count(helper.contextId(), identifier); | 276 helper.consoleMessageStorage()->count(helper.contextId(), identifier); |
| (...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 818 ->GetOwnPropertyDescriptor( | 818 ->GetOwnPropertyDescriptor( |
| 819 m_context, v8::Local<v8::String>::Cast(name)) | 819 m_context, v8::Local<v8::String>::Cast(name)) |
| 820 .ToLocal(&descriptor); | 820 .ToLocal(&descriptor); |
| 821 DCHECK(success); | 821 DCHECK(success); |
| 822 USE(success); | 822 USE(success); |
| 823 } | 823 } |
| 824 } | 824 } |
| 825 } | 825 } |
| 826 | 826 |
| 827 } // namespace v8_inspector | 827 } // namespace v8_inspector |
| OLD | NEW |