mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-04 02:57:38 +00:00
Bug 1568410 - (part 4) Remove Mutex::ShutDown() r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D40986 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
6256620c77
commit
46e226d3b7
@ -4002,8 +4002,6 @@ static bool ShellBuildId(JS::BuildIdCharVector* buildId);
|
||||
static void WorkerMain(WorkerInput* input) {
|
||||
MOZ_ASSERT(input->parentRuntime);
|
||||
|
||||
auto mutexShutdown = mozilla::MakeScopeExit([] { Mutex::ShutDown(); });
|
||||
|
||||
JSContext* cx = JS_NewContext(8L * 1024L * 1024L, 2L * 1024L * 1024L,
|
||||
input->parentRuntime);
|
||||
if (!cx) {
|
||||
@ -4303,8 +4301,6 @@ static void WatchdogMain(JSContext* cx) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Mutex::ShutDown();
|
||||
}
|
||||
|
||||
static bool ScheduleWatchdog(JSContext* cx, double t) {
|
||||
@ -7129,8 +7125,6 @@ struct BufferStreamState {
|
||||
static ExclusiveWaitableData<BufferStreamState>* bufferStreamState;
|
||||
|
||||
static void BufferStreamMain(BufferStreamJob* job) {
|
||||
auto mutexShutdown = MakeScopeExit([] { Mutex::ShutDown(); });
|
||||
|
||||
const uint8_t* bytes;
|
||||
size_t byteLength;
|
||||
JS::OptimizedEncodingListener* listener;
|
||||
|
@ -17,9 +17,6 @@ MOZ_THREAD_LOCAL(js::Mutex*) js::Mutex::HeldMutexStack;
|
||||
/* static */
|
||||
bool js::Mutex::Init() { return HeldMutexStack.init(); }
|
||||
|
||||
/* static */
|
||||
void js::Mutex::ShutDown() { MOZ_ASSERT(HeldMutexStack.get() == nullptr); }
|
||||
|
||||
void js::Mutex::lock() {
|
||||
preLockChecks();
|
||||
impl_.lock();
|
||||
|
@ -51,10 +51,8 @@ class Mutex {
|
||||
public:
|
||||
#ifdef DEBUG
|
||||
static bool Init();
|
||||
static void ShutDown();
|
||||
#else
|
||||
static bool Init() { return true; }
|
||||
static void ShutDown() {}
|
||||
#endif
|
||||
|
||||
explicit Mutex(const MutexId& id)
|
||||
|
@ -2089,7 +2089,6 @@ void HelperThread::ThreadMain(void* arg) {
|
||||
mozilla::recordreplay::AutoDisallowThreadEvents d;
|
||||
|
||||
static_cast<HelperThread*>(arg)->threadLoop();
|
||||
Mutex::ShutDown();
|
||||
}
|
||||
|
||||
void HelperThread::handleWasmTier1Workload(AutoLockHelperThreadState& locked) {
|
||||
|
@ -223,8 +223,6 @@ JS_PUBLIC_API void JS_ShutDown(void) {
|
||||
|
||||
js::wasm::ShutDown();
|
||||
|
||||
js::Mutex::ShutDown();
|
||||
|
||||
// The only difficult-to-address reason for the restriction that you can't
|
||||
// call JS_Init/stuff/JS_ShutDown multiple times is the Windows PRMJ
|
||||
// NowInit initialization code, which uses PR_CallOnce to initialize the
|
||||
|
Loading…
Reference in New Issue
Block a user