aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBruce Mitchener <bruce.mitchener@gmail.com>2014-01-20 15:03:35 +0700
committerBruce Mitchener <bruce.mitchener@gmail.com>2014-01-21 10:40:47 +0700
commite7ae95bd86e363d6c51ca00abacb6733fc0d01cb (patch)
treec4080c38043a205edca3d850be4ea74e0901a9f0 /src
parent9339aabb90aeb8999fae8e2761142d94e0877b3e (diff)
Move workaround for emscripten from include/exception to library.js.
Diffstat (limited to 'src')
-rw-r--r--src/library.js15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/library.js b/src/library.js
index c915125c..5e53805f 100644
--- a/src/library.js
+++ b/src/library.js
@@ -4539,7 +4539,20 @@ LibraryManager.library = {
}
},
- _ZNSt9exceptionD2Ev: function(){}, // XXX a dependency of dlmalloc, but not actually needed if libcxx is not anyhow included
+ // Destructors for std::exception since we don't have them implemented in libcxx as we aren't using libcxxabi.
+ // These are also needed for the dlmalloc tests.
+ _ZNSt9exceptionD1Ev: function() {},
+ _ZNSt9exceptionD2Ev: function() {},
+
+ _ZNKSt9exception4whatEv__deps: ['_malloc'],
+ _ZNKSt9exception4whatEv: function() {
+ if (!__ZNKSt9exception4whatEv.buffer) {
+ var name = "std::exception";
+ __ZNKSt9exception4whatEv.buffer = _malloc(name.length + 1);
+ writeStringToMemory(name, __ZNKSt9exception4whatEv.buffer);
+ }
+ return __ZNKSt9exception4whatEv.buffer;
+ },
_ZNSt9type_infoD2Ev: function(){},