Bug 1248416 - add symbols for bad_function_call exception for C++ runtimes. r=nfroyd

This commit is contained in:
Lee Salzman 2016-02-24 20:00:10 -05:00
parent c60e0b5cc7
commit 5a00a76a1f
5 changed files with 23 additions and 1 deletions

View File

@ -20,9 +20,11 @@ new
algorithm
atomic
deque
functional
ios
iosfwd
iostream
istream
iterator
limits
list

View File

@ -487,6 +487,7 @@ fstream
fstream.h
ft2build.h
fts.h
functional
gconf/gconf-client.h
Gdiplus.h
gdk/gdk.h
@ -565,6 +566,7 @@ ios
iosfwd
iostream
iostream.h
istream
iterator
JavaControl.h
JavaEmbedding/JavaControl.h

View File

@ -54,4 +54,10 @@ moz_Xruntime_error(const char* what)
abort_from_exception("runtime_error", what);
}
MFBT_API __declspec(noreturn) void
moz_Xbad_function_call()
{
abort_from_exception("bad_function_call", "bad function call");
}
} // namespace std

View File

@ -12,7 +12,10 @@
# error "Unable to wrap _RAISE(); CRT _RAISE() already defined"
#endif
#ifdef _XUTILITY_
# error "Unabled to wrap _X[exception]"(); CRT versions already declared"
# error "Unable to wrap _X[exception](); CRT versions already declared"
#endif
#ifdef _FUNCTIONAL_
# error "Unable to wrap _Xbad_function_call(); CRT version already declared"
#endif
#include "mozilla/mozalloc_abort.h"
@ -26,6 +29,8 @@
# define _Xout_of_range moz_Xout_of_range
# define _Xoverflow_error moz_Xoverflow_error
# define _Xruntime_error moz_Xruntime_error
// used by <functional>
# define _Xbad_function_call moz_Xbad_function_call
# include <xstddef>
# include <xutility>

View File

@ -49,6 +49,13 @@ __throw_bad_typeid(void)
mozalloc_abort("fatal: STL threw bad_typeid");
}
// used by <functional>
MOZ_NORETURN MOZ_ALWAYS_INLINE void
__throw_bad_function_call(void)
{
mozalloc_abort("fatal: STL threw bad_function_call");
}
MOZ_NORETURN MOZ_ALWAYS_INLINE void
__throw_logic_error(const char* msg)
{