Index: src/interpreter/bytecode-array-builder.cc |
diff --git a/src/interpreter/bytecode-array-builder.cc b/src/interpreter/bytecode-array-builder.cc |
index 231a9a25af01946fce1a4374bf3b96b467c67e9c..5bb0986b39ead35c7a6b30718aaab5847babe30e 100644 |
--- a/src/interpreter/bytecode-array-builder.cc |
+++ b/src/interpreter/bytecode-array-builder.cc |
@@ -536,6 +536,7 @@ BytecodeArrayBuilder& BytecodeArrayBuilder::ReThrow() { |
} |
BytecodeArrayBuilder& BytecodeArrayBuilder::Return() { |
+ SetReturnPosition(); |
Output(Bytecode::kReturn); |
return_seen_in_block_ = true; |
return *this; |
@@ -630,7 +631,6 @@ BytecodeArrayBuilder& BytecodeArrayBuilder::MarkTryEnd(int handler_id) { |
void BytecodeArrayBuilder::EnsureReturn() { |
if (!return_seen_in_block_) { |
LoadUndefined(); |
- SetReturnPosition(); |
Return(); |
} |
DCHECK(return_seen_in_block_); |