| Index: src/hydrogen.cc
|
| diff --git a/src/hydrogen.cc b/src/hydrogen.cc
|
| index fe59b5449aa85e4d6ab927cb2fe63842f53d5c79..636b2dd3918280a60bafb22cdaaa358087e53cc3 100644
|
| --- a/src/hydrogen.cc
|
| +++ b/src/hydrogen.cc
|
| @@ -5477,6 +5477,14 @@ void HOptimizedGraphBuilder::VisitThrow(Throw* expr) {
|
| HThrow* instr = Add<HThrow>(value);
|
| instr->set_position(expr->position());
|
| Add<HSimulate>(expr->id());
|
| +
|
| + // If the throw definitely exits the function, we can finish with a dummy
|
| + // control flow at this point. This is not the case if the throw is inside
|
| + // an inlined function which may be replaced.
|
| + if (call_context() == NULL) {
|
| + current_block()->FinishExit(new(zone()) HAbnormalExit);
|
| + set_current_block(NULL);
|
| + }
|
| }
|
|
|
|
|
|
|