Skip to content

Commit

Permalink
Return the result of context.finish(finallyLoc);
Browse files Browse the repository at this point in the history
In case we need to perform a pending abrupt completion because the finally
block did not override it, this commit forces another iteration of the
dispatch loop, so that context.next will be examined again.

Fixes #173.
  • Loading branch information
benjamn committed Feb 11, 2015
1 parent b8e092a commit 4fc5022
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/emit.js
Original file line number Diff line number Diff line change
Expand Up @@ -797,10 +797,10 @@ Ep.explodeStatement = function(path, labelId) {
self.explodeStatement(path.get("finalizer"));
});

self.emit(b.callExpression(
self.emit(b.returnStatement(b.callExpression(
self.contextProperty("finish"),
[finallyEntry.firstLoc]
));
)));
}
});

Expand Down

0 comments on commit 4fc5022

Please sign in to comment.