mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 11:55:49 +00:00
Bug 947683 - Fix --disable-threadsafe shell builds on OS X. r=luke
This commit is contained in:
parent
183ee8ff81
commit
6d867d31ea
@ -744,6 +744,7 @@ AsmJSMachExceptionHandler::AsmJSMachExceptionHandler()
|
||||
void
|
||||
AsmJSMachExceptionHandler::uninstall()
|
||||
{
|
||||
#ifdef JS_THREADSAFE
|
||||
if (installed_) {
|
||||
thread_port_t thread = mach_thread_self();
|
||||
kern_return_t kret = thread_set_exception_ports(thread,
|
||||
@ -781,11 +782,15 @@ AsmJSMachExceptionHandler::uninstall()
|
||||
JS_ASSERT(kret == KERN_SUCCESS);
|
||||
port_ = MACH_PORT_NULL;
|
||||
}
|
||||
#else
|
||||
JS_ASSERT(!installed_);
|
||||
#endif
|
||||
}
|
||||
|
||||
bool
|
||||
AsmJSMachExceptionHandler::install(JSRuntime *rt)
|
||||
{
|
||||
#ifdef JS_THREADSAFE
|
||||
JS_ASSERT(!installed());
|
||||
kern_return_t kret;
|
||||
mach_port_t thread;
|
||||
@ -825,6 +830,9 @@ AsmJSMachExceptionHandler::install(JSRuntime *rt)
|
||||
error:
|
||||
uninstall();
|
||||
return false;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
#else // If not Windows or Mac, assume Unix
|
||||
|
Loading…
Reference in New Issue
Block a user