Index: src/x64/full-codegen-x64.cc |
diff --git a/src/x64/full-codegen-x64.cc b/src/x64/full-codegen-x64.cc |
index 25bfd340294e2f7aa9a84a6b336748ad9e4f4f35..af33c49e8afb8a31a0857a7706d9db06c39b37fa 100644 |
--- a/src/x64/full-codegen-x64.cc |
+++ b/src/x64/full-codegen-x64.cc |
@@ -408,7 +408,9 @@ void FullCodeGenerator::EmitReturnSequence() { |
Label check_exit_codesize; |
masm_->bind(&check_exit_codesize); |
#endif |
- CodeGenerator::RecordPositions(masm_, function()->end_position() - 1); |
+ if (function()->end_position() != RelocInfo::kNoPosition) { |
+ CodeGenerator::RecordPositions(masm_, function()->end_position() - 1); |
+ } |
__ RecordJSReturn(); |
// Do not use the leave instruction here because it is too short to |
// patch with the code required by the debugger. |