mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-25 11:58:55 +00:00
Bug 1499471: Mark unsafe API functions to allow calling from recovery code r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D8899 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
5392b776a6
commit
95556db740
@ -20,7 +20,7 @@ EmulatesUndefined(JSObject* obj)
|
||||
{
|
||||
// This may be called off the main thread. It's OK not to expose the object
|
||||
// here as it doesn't escape.
|
||||
AutoUnsafeCallWithABI unsafe;
|
||||
AutoUnsafeCallWithABI unsafe(UnsafeABIStrictness::AllowPendingExceptions);
|
||||
JSObject* actual = MOZ_LIKELY(!obj->is<WrapperObject>()) ? obj : UncheckedUnwrapWithoutExpose(obj);
|
||||
return actual->getClass()->emulatesUndefined();
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ namespace js {
|
||||
inline double
|
||||
NumberDiv(double a, double b)
|
||||
{
|
||||
AutoUnsafeCallWithABI unsafe;
|
||||
AutoUnsafeCallWithABI unsafe(UnsafeABIStrictness::AllowPendingExceptions);
|
||||
if (b == 0) {
|
||||
if (a == 0 || mozilla::IsNaN(a)) {
|
||||
return JS::GenericNaN();
|
||||
@ -36,7 +36,7 @@ NumberDiv(double a, double b)
|
||||
inline double
|
||||
NumberMod(double a, double b)
|
||||
{
|
||||
AutoUnsafeCallWithABI unsafe;
|
||||
AutoUnsafeCallWithABI unsafe(UnsafeABIStrictness::AllowPendingExceptions);
|
||||
if (b == 0) {
|
||||
return JS::GenericNaN();
|
||||
}
|
||||
|
@ -543,7 +543,7 @@ js::minmax_impl(JSContext* cx, bool max, HandleValue a, HandleValue b, MutableHa
|
||||
double
|
||||
js::powi(double x, int32_t y)
|
||||
{
|
||||
AutoUnsafeCallWithABI unsafe;
|
||||
AutoUnsafeCallWithABI unsafe(UnsafeABIStrictness::AllowPendingExceptions);
|
||||
uint32_t n = Abs(y);
|
||||
double m = x;
|
||||
double p = 1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user