Index: src/api.cc |
diff --git a/src/api.cc b/src/api.cc |
index 5bd6fa6c37378a01fa8b682838d415791e072c40..5b2e4a03d298d4e64b9c366b3c1d5e7024f3d359 100644 |
--- a/src/api.cc |
+++ b/src/api.cc |
@@ -8230,9 +8230,8 @@ const std::vector<CpuProfileDeoptInfo>& CpuProfileNode::GetDeoptInfos() const { |
void CpuProfile::Delete() { |
i::CpuProfile* profile = reinterpret_cast<i::CpuProfile*>(this); |
- i::Isolate* isolate = profile->top_down()->isolate(); |
- i::CpuProfiler* profiler = isolate->cpu_profiler(); |
- DCHECK(profiler != NULL); |
+ i::CpuProfiler* profiler = profile->cpu_profiler(); |
+ DCHECK(profiler != nullptr); |
profiler->DeleteProfile(profile); |
} |