| Index: src/full-codegen/full-codegen.cc
|
| diff --git a/src/full-codegen/full-codegen.cc b/src/full-codegen/full-codegen.cc
|
| index 008be18e363ecb52a8e36716f25c62c9484543a9..1d8c8b37b96879b5f8a0ef7542e70602a7bd62d6 100644
|
| --- a/src/full-codegen/full-codegen.cc
|
| +++ b/src/full-codegen/full-codegen.cc
|
| @@ -560,7 +560,10 @@ void FullCodeGenerator::SetFunctionPosition(FunctionLiteral* fun) {
|
|
|
|
|
| void FullCodeGenerator::SetReturnPosition(FunctionLiteral* fun) {
|
| - RecordStatementPosition(masm_, fun->end_position() - 1);
|
| + // For default constructors, start position equals end position, and there
|
| + // is no source code besides the class literal.
|
| + int pos = std::max(fun->start_position(), fun->end_position() - 1);
|
| + RecordStatementPosition(masm_, pos);
|
| if (info_->is_debug()) {
|
| // Always emit a debug break slot before a return.
|
| DebugCodegen::GenerateSlot(masm_, RelocInfo::DEBUG_BREAK_SLOT_AT_RETURN);
|
|
|