| Index: src/isolate.cc
|
| diff --git a/src/isolate.cc b/src/isolate.cc
|
| index 966b73b3ea2706cabec6744d96642a93b17e2b9f..87729783603675cd1b3e80186fc6e04ecfb474d3 100644
|
| --- a/src/isolate.cc
|
| +++ b/src/isolate.cc
|
| @@ -511,9 +511,18 @@
|
| // line_number is already shifted by the script_line_offset.
|
| int relative_line_number = line_number - script_line_offset;
|
| if (!column_key_.is_null() && relative_line_number >= 0) {
|
| - int column = Script::GetColumnNumber(script, position);
|
| + Handle<FixedArray> line_ends(FixedArray::cast(script->line_ends()));
|
| + int start = (relative_line_number == 0) ? 0 :
|
| + Smi::cast(line_ends->get(relative_line_number - 1))->value() + 1;
|
| + int column_offset = position - start;
|
| + if (relative_line_number == 0) {
|
| + // For the case where the code is on the same line as the script
|
| + // tag.
|
| + column_offset += script->column_offset()->value();
|
| + }
|
| JSObject::AddProperty(stack_frame, column_key_,
|
| - handle(Smi::FromInt(column + 1), isolate_), NONE);
|
| + handle(Smi::FromInt(column_offset + 1), isolate_),
|
| + NONE);
|
| }
|
| JSObject::AddProperty(stack_frame, line_key_,
|
| handle(Smi::FromInt(line_number + 1), isolate_),
|
|
|