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

Unified Diff: src/inspector/V8StackTraceImpl.cpp

Issue 2332243002: [inspector] fixed all deprecated calls (Closed)
Patch Set: addressed comments 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 | « src/inspector/V8ProfilerAgentImpl.cpp ('k') | src/v8.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/inspector/V8StackTraceImpl.cpp
diff --git a/src/inspector/V8StackTraceImpl.cpp b/src/inspector/V8StackTraceImpl.cpp
index 25a0e7caf7892fd68b21cc0a37fa66cd5eee186f..972f2d28e894dfdea59a57a3ffc5aaee043e19d1 100644
--- a/src/inspector/V8StackTraceImpl.cpp
+++ b/src/inspector/V8StackTraceImpl.cpp
@@ -6,6 +6,8 @@
#include "src/inspector/StringUtil.h"
#include "src/inspector/V8Debugger.h"
+#include "src/inspector/V8InspectorImpl.h"
+#include "src/inspector/V8ProfilerAgentImpl.h"
#include "src/inspector/protocol/Protocol.h"
#include "include/v8-debug.h"
@@ -158,7 +160,12 @@ std::unique_ptr<V8StackTraceImpl> V8StackTraceImpl::capture(
v8::HandleScope handleScope(isolate);
v8::Local<v8::StackTrace> stackTrace;
if (isolate->InContext()) {
- isolate->GetCpuProfiler()->CollectSample();
+ if (debugger) {
+ V8InspectorImpl* inspector = debugger->inspector();
+ V8ProfilerAgentImpl* profilerAgent =
+ inspector->enabledProfilerAgentForGroup(contextGroupId);
+ if (profilerAgent) profilerAgent->collectSample();
+ }
stackTrace = v8::StackTrace::CurrentStackTrace(isolate, maxStackSize,
stackTraceOptions);
}
« no previous file with comments | « src/inspector/V8ProfilerAgentImpl.cpp ('k') | src/v8.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698