Index: src/interpreter/bytecode-generator.cc |
diff --git a/src/interpreter/bytecode-generator.cc b/src/interpreter/bytecode-generator.cc |
index 42aa0f7c9fd26684f7d4d71c3f54fc34d23d777d..d11f510c1e395ad036d224661a002ab7caf035da 100644 |
--- a/src/interpreter/bytecode-generator.cc |
+++ b/src/interpreter/bytecode-generator.cc |
@@ -1114,6 +1114,7 @@ void BytecodeGenerator::VisitTryCatchStatement(TryCatchStatement* stmt) { |
// when the handler is entered by the stack-unwinding machinery. |
// TODO(mstarzinger): Be smarter about register allocation. |
Register context = register_allocator()->NewRegister(); |
+ builder()->MoveRegister(Register::current_context(), context); |
// Evaluate the try-block inside a control scope. This simulates a handler |
// that is intercepting 'throw' control commands. |
@@ -1167,6 +1168,7 @@ void BytecodeGenerator::VisitTryFinallyStatement(TryFinallyStatement* stmt) { |
// when the handler is entered by the stack-unwinding machinery. |
// TODO(mstarzinger): Be smarter about register allocation. |
Register context = register_allocator()->NewRegister(); |
+ builder()->MoveRegister(Register::current_context(), context); |
// Evaluate the try-block inside a control scope. This simulates a handler |
// that is intercepting all control commands. |