Index: src/compiler/control-builders.cc |
diff --git a/src/compiler/control-builders.cc b/src/compiler/control-builders.cc |
index 6bc364965c0c6a55d7bed600855f9bdad07b2596..35798283558ed20b25cfba1adc49d5bbd8a9f0c4 100644 |
--- a/src/compiler/control-builders.cc |
+++ b/src/compiler/control-builders.cc |
@@ -160,6 +160,7 @@ void BlockBuilder::EndBlock() { |
void TryCatchBuilder::BeginTry() { |
+ exit_environment_ = environment()->CopyAsUnreachable(); |
catch_environment_ = environment()->CopyAsUnreachable(); |
catch_environment_->Push(the_hole()); |
} |
@@ -174,7 +175,7 @@ void TryCatchBuilder::Throw(Node* exception) { |
void TryCatchBuilder::EndTry() { |
- exit_environment_ = environment(); |
+ exit_environment_->Merge(environment()); |
exception_node_ = catch_environment_->Pop(); |
set_environment(catch_environment_); |
} |