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

Side by Side Diff: src/debug/debug-frames.cc

Issue 2112443002: [debugger] Simplify deletion of DeoptimizedFrameInfo. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 5 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/deoptimizer.h » ('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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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/debug/debug-frames.h" 5 #include "src/debug/debug-frames.h"
6 6
7 #include "src/frames-inl.h" 7 #include "src/frames-inl.h"
8 8
9 namespace v8 { 9 namespace v8 {
10 namespace internal { 10 namespace internal {
(...skipping 13 matching lines...) Expand all
24 !FLAG_turbo_asm_deoptimization) { 24 !FLAG_turbo_asm_deoptimization) {
25 is_optimized_ = false; 25 is_optimized_ = false;
26 return; 26 return;
27 } 27 }
28 28
29 deoptimized_frame_ = Deoptimizer::DebuggerInspectableFrame( 29 deoptimized_frame_ = Deoptimizer::DebuggerInspectableFrame(
30 frame, inlined_jsframe_index, isolate); 30 frame, inlined_jsframe_index, isolate);
31 } 31 }
32 } 32 }
33 33
34
35 FrameInspector::~FrameInspector() { 34 FrameInspector::~FrameInspector() {
36 // Get rid of the calculated deoptimized frame if any. 35 // Get rid of the calculated deoptimized frame if any.
37 if (deoptimized_frame_ != NULL) { 36 if (deoptimized_frame_ != nullptr) {
Benedikt Meurer 2016/06/29 09:56:45 You don't need this check, delete already does a n
38 Deoptimizer::DeleteDebuggerInspectableFrame(deoptimized_frame_, isolate_); 37 delete deoptimized_frame_;
39 } 38 }
40 } 39 }
41 40
42
43 int FrameInspector::GetParametersCount() { 41 int FrameInspector::GetParametersCount() {
44 return is_optimized_ ? deoptimized_frame_->parameters_count() 42 return is_optimized_ ? deoptimized_frame_->parameters_count()
45 : frame_->ComputeParametersCount(); 43 : frame_->ComputeParametersCount();
46 } 44 }
47 45
48 Handle<Object> FrameInspector::GetFunction() { 46 Handle<Object> FrameInspector::GetFunction() {
49 return is_optimized_ ? deoptimized_frame_->GetFunction() 47 return is_optimized_ ? deoptimized_frame_->GetFunction()
50 : handle(frame_->function(), isolate_); 48 : handle(frame_->function(), isolate_);
51 } 49 }
52 50
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 if (!frames[i].function()->shared()->IsSubjectToDebugging()) continue; 219 if (!frames[i].function()->shared()->IsSubjectToDebugging()) continue;
222 if (++count == index) return i; 220 if (++count == index) return i;
223 } 221 }
224 } 222 }
225 return -1; 223 return -1;
226 } 224 }
227 225
228 226
229 } // namespace internal 227 } // namespace internal
230 } // namespace v8 228 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/deoptimizer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698