Commit 9d0d5fd2 authored by yangguo's avatar yangguo Committed by Commit bot

[debugger] fix --print-break-location for multiline scripts.

We otherwise would print the \n from the last line.

R=vogelheim@chromium.org

Review URL: https://codereview.chromium.org/1738723003

Cr-Commit-Position: refs/heads/master@{#34291}
parent e89a7b47
......@@ -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();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment