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

Side by Side Diff: src/inspector/v8-console.cc

Issue 2789593002: [inspector] don't use v8::Isolate::GetCurrent in V8StackTraceImpl (Closed)
Patch Set: Created 3 years, 8 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 unified diff | Download patch
« no previous file with comments | « no previous file | src/inspector/v8-stack-trace-impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 helper.reportCallWithDefaultArgument(ConsoleAPIType::kClear, 254 helper.reportCallWithDefaultArgument(ConsoleAPIType::kClear,
255 String16("console.clear")); 255 String16("console.clear"));
256 } 256 }
257 257
258 void V8Console::countCallback(const v8::FunctionCallbackInfo<v8::Value>& info) { 258 void V8Console::countCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
259 ConsoleHelper helper(info); 259 ConsoleHelper helper(info);
260 String16 title = helper.firstArgToString(String16()); 260 String16 title = helper.firstArgToString(String16());
261 String16 identifier; 261 String16 identifier;
262 if (title.isEmpty()) { 262 if (title.isEmpty()) {
263 std::unique_ptr<V8StackTraceImpl> stackTrace = 263 std::unique_ptr<V8StackTraceImpl> stackTrace =
264 V8StackTraceImpl::capture(nullptr, 0, 1); 264 V8StackTraceImpl::capture(helper.inspector()->debugger(), 0, 1);
265 if (stackTrace && !stackTrace->isEmpty()) { 265 if (stackTrace && !stackTrace->isEmpty()) {
266 identifier = toString16(stackTrace->topSourceURL()) + ":" + 266 identifier = toString16(stackTrace->topSourceURL()) + ":" +
267 String16::fromInteger(stackTrace->topLineNumber()); 267 String16::fromInteger(stackTrace->topLineNumber());
268 } 268 }
269 } else { 269 } else {
270 identifier = title + "@"; 270 identifier = title + "@";
271 } 271 }
272 272
273 int count = 273 int count =
274 helper.consoleMessageStorage()->count(helper.contextId(), identifier); 274 helper.consoleMessageStorage()->count(helper.contextId(), identifier);
(...skipping 538 matching lines...) Expand 10 before | Expand all | Expand 10 after
813 ->GetOwnPropertyDescriptor( 813 ->GetOwnPropertyDescriptor(
814 m_context, v8::Local<v8::String>::Cast(name)) 814 m_context, v8::Local<v8::String>::Cast(name))
815 .ToLocal(&descriptor); 815 .ToLocal(&descriptor);
816 DCHECK(success); 816 DCHECK(success);
817 USE(success); 817 USE(success);
818 } 818 }
819 } 819 }
820 } 820 }
821 821
822 } // namespace v8_inspector 822 } // namespace v8_inspector
OLDNEW
« no previous file with comments | « no previous file | src/inspector/v8-stack-trace-impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698