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

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

Issue 2168883002: [debugger] remove obsolete work-around for return position. (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 | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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.h" 5 #include "src/debug/debug.h"
6 6
7 #include "src/api.h" 7 #include "src/api.h"
8 #include "src/arguments.h" 8 #include "src/arguments.h"
9 #include "src/bootstrapper.h" 9 #include "src/bootstrapper.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 return v8::Utils::ToLocal(native_context); 73 return v8::Utils::ToLocal(native_context);
74 } 74 }
75 75
76 BreakLocation::BreakLocation(Handle<DebugInfo> debug_info, DebugBreakType type, 76 BreakLocation::BreakLocation(Handle<DebugInfo> debug_info, DebugBreakType type,
77 int code_offset, int position, 77 int code_offset, int position,
78 int statement_position) 78 int statement_position)
79 : debug_info_(debug_info), 79 : debug_info_(debug_info),
80 code_offset_(code_offset), 80 code_offset_(code_offset),
81 type_(type), 81 type_(type),
82 position_(position), 82 position_(position),
83 statement_position_(statement_position) { 83 statement_position_(statement_position) {}
84 if (type == DEBUG_BREAK_SLOT_AT_RETURN) {
85 int return_position = 0;
86 SharedFunctionInfo* shared = debug_info->shared();
87 if (shared->HasSourceCode()) {
88 return_position =
89 std::max(shared->end_position() - 1, shared->start_position());
90 }
91 // TODO(yangguo): find out why return position is wrong for liveedit.
92 position_ = return_position;
93 statement_position_ = return_position;
94 }
95 }
96 84
97 BreakLocation::Iterator* BreakLocation::GetIterator( 85 BreakLocation::Iterator* BreakLocation::GetIterator(
98 Handle<DebugInfo> debug_info, BreakLocatorType type) { 86 Handle<DebugInfo> debug_info, BreakLocatorType type) {
99 if (debug_info->abstract_code()->IsBytecodeArray()) { 87 if (debug_info->abstract_code()->IsBytecodeArray()) {
100 return new BytecodeArrayIterator(debug_info, type); 88 return new BytecodeArrayIterator(debug_info, type);
101 } else { 89 } else {
102 return new CodeIterator(debug_info, type); 90 return new CodeIterator(debug_info, type);
103 } 91 }
104 } 92 }
105 93
(...skipping 2478 matching lines...) Expand 10 before | Expand all | Expand 10 after
2584 } 2572 }
2585 2573
2586 2574
2587 void LockingCommandMessageQueue::Clear() { 2575 void LockingCommandMessageQueue::Clear() {
2588 base::LockGuard<base::Mutex> lock_guard(&mutex_); 2576 base::LockGuard<base::Mutex> lock_guard(&mutex_);
2589 queue_.Clear(); 2577 queue_.Clear();
2590 } 2578 }
2591 2579
2592 } // namespace internal 2580 } // namespace internal
2593 } // namespace v8 2581 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698