From 4a8ac723aebd286889a7677f12bb5cca9cf70434 Mon Sep 17 00:00:00 2001 From: titzer Date: Wed, 29 Jun 2016 02:42:53 -0700 Subject: [PATCH] [debugger] Simplify deletion of DeoptimizedFrameInfo. R=yangguo@chromium.org,jarin@chromium.org BUG= Review-Url: https://codereview.chromium.org/2112443002 Cr-Commit-Position: refs/heads/master@{#37377} --- src/debug/debug-frames.cc | 6 ++---- src/deoptimizer.cc | 8 -------- src/deoptimizer.h | 2 -- 3 files changed, 2 insertions(+), 14 deletions(-) diff --git a/src/debug/debug-frames.cc b/src/debug/debug-frames.cc index b1a8af2569..e683fa2d15 100644 --- a/src/debug/debug-frames.cc +++ b/src/debug/debug-frames.cc @@ -31,15 +31,13 @@ FrameInspector::FrameInspector(JavaScriptFrame* frame, } } - FrameInspector::~FrameInspector() { // Get rid of the calculated deoptimized frame if any. - if (deoptimized_frame_ != NULL) { - Deoptimizer::DeleteDebuggerInspectableFrame(deoptimized_frame_, isolate_); + if (deoptimized_frame_ != nullptr) { + delete deoptimized_frame_; } } - int FrameInspector::GetParametersCount() { return is_optimized_ ? deoptimized_frame_->parameters_count() : frame_->ComputeParametersCount(); diff --git a/src/deoptimizer.cc b/src/deoptimizer.cc index 4cf41a9f27..8be6cd1ee5 100644 --- a/src/deoptimizer.cc +++ b/src/deoptimizer.cc @@ -159,13 +159,6 @@ DeoptimizedFrameInfo* Deoptimizer::DebuggerInspectableFrame( return info; } - -void Deoptimizer::DeleteDebuggerInspectableFrame(DeoptimizedFrameInfo* info, - Isolate* isolate) { - delete info; -} - - void Deoptimizer::GenerateDeoptimizationEntries(MacroAssembler* masm, int count, BailoutType type) { @@ -173,7 +166,6 @@ void Deoptimizer::GenerateDeoptimizationEntries(MacroAssembler* masm, generator.Generate(); } - void Deoptimizer::VisitAllOptimizedFunctionsForContext( Context* context, OptimizedFunctionVisitor* visitor) { DisallowHeapAllocation no_allocation; diff --git a/src/deoptimizer.h b/src/deoptimizer.h index db204066ca..b51ff0ee90 100644 --- a/src/deoptimizer.h +++ b/src/deoptimizer.h @@ -493,8 +493,6 @@ class Deoptimizer : public Malloced { static DeoptimizedFrameInfo* DebuggerInspectableFrame(JavaScriptFrame* frame, int jsframe_index, Isolate* isolate); - static void DeleteDebuggerInspectableFrame(DeoptimizedFrameInfo* info, - Isolate* isolate); // Makes sure that there is enough room in the relocation // information of a code object to perform lazy deoptimization