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

Unified Diff: src/debug/debug.cc

Issue 1759603002: [debugger] Ensure at least one breakable position per function. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/full-codegen/arm/full-codegen-arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/debug/debug.cc
diff --git a/src/debug/debug.cc b/src/debug/debug.cc
index 56eb8cbdd998aaac176c4920e07c4cef88cab7e0..c28e46885b4d92b88cca4ddc0fc303a4a42f74e7 100644
--- a/src/debug/debug.cc
+++ b/src/debug/debug.cc
@@ -98,7 +98,9 @@ BreakLocation::CodeIterator::CodeIterator(Handle<DebugInfo> debug_info,
: Iterator(debug_info),
reloc_iterator_(debug_info->abstract_code()->GetCode(),
GetModeMask(type)) {
- if (!Done()) Next();
+ // There is at least one break location.
+ DCHECK(!Done());
+ Next();
}
int BreakLocation::CodeIterator::GetModeMask(BreakLocatorType type) {
@@ -179,7 +181,9 @@ BreakLocation::BytecodeArrayIterator::BytecodeArrayIterator(
->source_position_table()),
break_locator_type_(type),
start_position_(debug_info->shared()->start_position()) {
- if (!Done()) Next();
+ // There is at least one break location.
+ DCHECK(!Done());
+ Next();
}
void BreakLocation::BytecodeArrayIterator::Next() {
« no previous file with comments | « no previous file | src/full-codegen/arm/full-codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698