Index: src/interpreter/bytecode-array-builder.cc |
diff --git a/src/interpreter/bytecode-array-builder.cc b/src/interpreter/bytecode-array-builder.cc |
index 75bf631d300a9349e7369806592914800ebc3101..5069d5edc8449e1081bbafd373e7ddde65690ad5 100644 |
--- a/src/interpreter/bytecode-array-builder.cc |
+++ b/src/interpreter/bytecode-array-builder.cc |
@@ -760,7 +760,6 @@ BytecodeArrayBuilder& BytecodeArrayBuilder::ReThrow() { |
BytecodeArrayBuilder& BytecodeArrayBuilder::Return() { |
- SetReturnPosition(); |
Output(Bytecode::kReturn); |
exit_seen_in_block_ = true; |
return *this; |
@@ -864,6 +863,7 @@ void BytecodeArrayBuilder::LeaveBasicBlock() { |
void BytecodeArrayBuilder::EnsureReturn() { |
if (!exit_seen_in_block_) { |
LoadUndefined(); |
+ SetReturnPosition(); |
Return(); |
} |
DCHECK(exit_seen_in_block_); |