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

Unified Diff: third_party/WebKit/Source/core/inspector/v8/V8ProfilerAgentImpl.cpp

Issue 1637413003: Stop using Isolate::GetCurrent() in inspector/v8 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 | « third_party/WebKit/Source/core/inspector/v8/JavaScriptCallFrame.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/inspector/v8/V8ProfilerAgentImpl.cpp
diff --git a/third_party/WebKit/Source/core/inspector/v8/V8ProfilerAgentImpl.cpp b/third_party/WebKit/Source/core/inspector/v8/V8ProfilerAgentImpl.cpp
index 798c8ad4b68156b18f3aaa95e078602f96a25667..cc6242711bb5028138c84912582cadb023ebe81b 100644
--- a/third_party/WebKit/Source/core/inspector/v8/V8ProfilerAgentImpl.cpp
+++ b/third_party/WebKit/Source/core/inspector/v8/V8ProfilerAgentImpl.cpp
@@ -39,15 +39,15 @@ PassRefPtr<TypeBuilder::Array<TypeBuilder::Profiler::PositionTickInfo>> buildIns
return array.release();
}
-PassRefPtr<TypeBuilder::Profiler::CPUProfileNode> buildInspectorObjectFor(const v8::CpuProfileNode* node)
+PassRefPtr<TypeBuilder::Profiler::CPUProfileNode> buildInspectorObjectFor(v8::Isolate* isolate, const v8::CpuProfileNode* node)
{
- v8::HandleScope handleScope(v8::Isolate::GetCurrent());
+ v8::HandleScope handleScope(isolate);
RefPtr<TypeBuilder::Array<TypeBuilder::Profiler::CPUProfileNode>> children = TypeBuilder::Array<TypeBuilder::Profiler::CPUProfileNode>::create();
const int childrenCount = node->GetChildrenCount();
for (int i = 0; i < childrenCount; i++) {
const v8::CpuProfileNode* child = node->GetChild(i);
- children->addItem(buildInspectorObjectFor(child));
+ children->addItem(buildInspectorObjectFor(isolate, child));
}
RefPtr<TypeBuilder::Array<TypeBuilder::Profiler::PositionTickInfo>> positionTicks = buildInspectorObjectForPositionTicks(node);
@@ -85,10 +85,10 @@ PassRefPtr<TypeBuilder::Array<double>> buildInspectorObjectForTimestamps(v8::Cpu
return array.release();
}
-PassRefPtr<TypeBuilder::Profiler::CPUProfile> createCPUProfile(v8::CpuProfile* v8profile)
+PassRefPtr<TypeBuilder::Profiler::CPUProfile> createCPUProfile(v8::Isolate* isolate, v8::CpuProfile* v8profile)
{
RefPtr<TypeBuilder::Profiler::CPUProfile> profile = TypeBuilder::Profiler::CPUProfile::create()
- .setHead(buildInspectorObjectFor(v8profile->GetTopDownRoot()))
+ .setHead(buildInspectorObjectFor(isolate, v8profile->GetTopDownRoot()))
.setStartTime(static_cast<double>(v8profile->GetStartTime()) / 1000000)
.setEndTime(static_cast<double>(v8profile->GetEndTime()) / 1000000);
profile->setSamples(buildInspectorObjectForSamples(v8profile));
@@ -279,7 +279,7 @@ PassRefPtr<TypeBuilder::Profiler::CPUProfile> V8ProfilerAgentImpl::stopProfiling
return nullptr;
RefPtr<TypeBuilder::Profiler::CPUProfile> result;
if (serialize)
- result = createCPUProfile(profile);
+ result = createCPUProfile(m_isolate, profile);
profile->Delete();
return result.release();
}
« no previous file with comments | « third_party/WebKit/Source/core/inspector/v8/JavaScriptCallFrame.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698