summaryrefslogtreecommitdiff
path: root/system/lib/libcxxabi/src/cxa_new_delete.cpp
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-04-01 12:55:33 -0700
committerAlon Zakai <alonzakai@gmail.com>2013-04-01 12:55:33 -0700
commit8408257cd66435af849f493c10c7f0e8d1d5fa3b (patch)
tree8b05963e8608b22f71620f512679d7cd5b1de548 /system/lib/libcxxabi/src/cxa_new_delete.cpp
parenta8e4801c7d38033fff760ea26a4579aa324e303e (diff)
parent36600f34ef0ec2cf75165be3753567e256f514db (diff)
Merge branch 'incoming'
Diffstat (limited to 'system/lib/libcxxabi/src/cxa_new_delete.cpp')
-rw-r--r--system/lib/libcxxabi/src/cxa_new_delete.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/system/lib/libcxxabi/src/cxa_new_delete.cpp b/system/lib/libcxxabi/src/cxa_new_delete.cpp
index 6352001b..e6fee5f2 100644
--- a/system/lib/libcxxabi/src/cxa_new_delete.cpp
+++ b/system/lib/libcxxabi/src/cxa_new_delete.cpp
@@ -228,4 +228,15 @@ bad_array_new_length::what() const _NOEXCEPT
return "bad_array_new_length";
}
+#ifdef EMSCRIPTEN
+// We don't build the new.cpp from libcxx, so we need to define this.
+void
+__throw_bad_alloc()
+{
+#ifndef _LIBCPP_NO_EXCEPTIONS
+ throw bad_alloc();
+#endif
+}
+#endif
+
} // std