aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-09-18 14:36:41 -0700
committerAlon Zakai <alonzakai@gmail.com>2013-09-18 14:36:41 -0700
commit4c209071031528d8f6c60198f0d7395f9ef22be9 (patch)
tree184623a434075bdb959a5b060267c68d3e67a0bc
parentfe524f9383fa6c06b7256f58fb1ef552b7660a7f (diff)
parentb59df0d9667fba72c25344680495ccafb8271919 (diff)
Merge pull request #1630 from ngld/fix-resume-exception
Fix EXCEPTION_CATCHING_WHITELIST (#1623)
-rw-r--r--AUTHORS1
-rw-r--r--src/jsifier.js4
2 files changed, 3 insertions, 2 deletions
diff --git a/AUTHORS b/AUTHORS
index a0475661..5c22b029 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -96,4 +96,5 @@ a license to everyone to use it as detailed in LICENSE.)
* Aidan Hobson Sayers <aidanhs@cantab.net>
* Charlie Birks <admin@daftgames.net>
* Ranger Harke <ranger.harke@autodesk.com> (copyright owned by Autodesk, Inc.)
+* Tobias Vrinssen <tobias@vrinssen.de>
diff --git a/src/jsifier.js b/src/jsifier.js
index 1f53b1a2..fdde8dfb 100644
--- a/src/jsifier.js
+++ b/src/jsifier.js
@@ -1235,7 +1235,7 @@ function JSify(data, functionsOnly, givenFunctions) {
return ret + ';';
});
makeFuncLineActor('resume', function(item) {
- if (DISABLE_EXCEPTION_CATCHING) return 'abort()';
+ if (DISABLE_EXCEPTION_CATCHING && !(item.funcData.ident in EXCEPTION_CATCHING_WHITELIST)) return 'abort()';
if (item.ident == 0) {
// No exception to resume, so we can just bail.
// This is related to issue #917 and http://llvm.org/PR15518
@@ -1311,7 +1311,7 @@ function JSify(data, functionsOnly, givenFunctions) {
}
});
makeFuncLineActor('landingpad', function(item) {
- if (DISABLE_EXCEPTION_CATCHING && USE_TYPED_ARRAYS == 2) {
+ if (DISABLE_EXCEPTION_CATCHING && !(item.funcData.ident in EXCEPTION_CATCHING_WHITELIST) && USE_TYPED_ARRAYS == 2) {
ret = makeVarDef(item.assignTo) + '$0 = 0; ' + item.assignTo + '$1 = 0;';
item.assignTo = null;
if (VERBOSE) warnOnce('landingpad, but exceptions are disabled!');