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

Side by Side Diff: src/debug.cc

Issue 2883042: Breakpoint position should be inside function body. (Closed)
Patch Set: Created 10 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
OLDNEW
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 } 163 }
164 } 164 }
165 } 165 }
166 } 166 }
167 167
168 // Check for break at return. 168 // Check for break at return.
169 if (RelocInfo::IsJSReturn(rmode())) { 169 if (RelocInfo::IsJSReturn(rmode())) {
170 // Set the positions to the end of the function. 170 // Set the positions to the end of the function.
171 if (debug_info_->shared()->HasSourceCode()) { 171 if (debug_info_->shared()->HasSourceCode()) {
172 position_ = debug_info_->shared()->end_position() - 172 position_ = debug_info_->shared()->end_position() -
173 debug_info_->shared()->start_position(); 173 debug_info_->shared()->start_position() - 1;
174 } else { 174 } else {
175 position_ = 0; 175 position_ = 0;
176 } 176 }
177 statement_position_ = position_; 177 statement_position_ = position_;
178 break_point_++; 178 break_point_++;
179 return; 179 return;
180 } 180 }
181 } 181 }
182 } 182 }
183 183
(...skipping 2812 matching lines...) Expand 10 before | Expand all | Expand 10 after
2996 { 2996 {
2997 Locker locker; 2997 Locker locker;
2998 Debugger::CallMessageDispatchHandler(); 2998 Debugger::CallMessageDispatchHandler();
2999 } 2999 }
3000 } 3000 }
3001 } 3001 }
3002 3002
3003 #endif // ENABLE_DEBUGGER_SUPPORT 3003 #endif // ENABLE_DEBUGGER_SUPPORT
3004 3004
3005 } } // namespace v8::internal 3005 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/codegen.cc ('k') | src/full-codegen.cc » ('j') | src/full-codegen.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698