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

Unified Diff: src/debug/debug.cc

Issue 1738723003: [debugger] fix --print-break-location for multiline scripts. (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 | no next file » | 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 ef170e59c7f7bc93c8fd3c6a2bcfea4bc0d5dee9..a15743dcd6e303dd1a0c67c31b371eccd4981b6f 100644
--- a/src/debug/debug.cc
+++ b/src/debug/debug.cc
@@ -2340,7 +2340,7 @@ void Debug::PrintBreakLocation() {
int column = Script::GetColumnNumber(script, source_position);
Handle<FixedArray> line_ends(FixedArray::cast(script->line_ends()));
int line_start =
- line == 0 ? 0 : Smi::cast(line_ends->get(line - 1))->value();
+ line == 0 ? 0 : Smi::cast(line_ends->get(line - 1))->value() + 1;
int line_end = Smi::cast(line_ends->get(line))->value();
DisallowHeapAllocation no_gc;
String::FlatContent content = source->GetFlatContent();
« 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