aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-03-20 14:18:14 -0700
committerAlon Zakai <alonzakai@gmail.com>2013-03-20 14:18:14 -0700
commit5090adfc7b5fd5fc249377d9b55677b4144d7126 (patch)
treea77ca9a6a08781769066c3b9ff82ccc22f3f62fc
parent02a8619257f5dc17a21f09084fbfed5c3ba8118f (diff)
parent6fd0fa92b402c7433d8e1d95b15704281cbd25b0 (diff)
Merge pull request #972 from waywardmonkeys/fix-resume-undef
When there's no exception, just drop the resume.
-rw-r--r--src/jsifier.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/jsifier.js b/src/jsifier.js
index 7db2ee70..b62bbe6c 100644
--- a/src/jsifier.js
+++ b/src/jsifier.js
@@ -1167,6 +1167,11 @@ function JSify(data, functionsOnly, givenFunctions) {
return ret + ';';
});
makeFuncLineActor('resume', function(item) {
+ if (item.ident == 0) {
+ // No exception to resume, so we can just bail.
+ // This is related to issue #917 and http://llvm.org/PR15518
+ return ';';
+ }
// If there is no current exception, set this one as it (during a resume, the current exception can be wiped out)
var ptr = makeStructuralAccess(item.ident, 0);
return (EXCEPTION_DEBUG ? 'Module.print("Resuming exception");' : '') +