void IPCBlobInputStreamChild::ActorDestroy(IProtocol::ActorDestroyReason aReason) { bool migrating = false; { MutexAutoLock lock(mMutex); migrating = mState == eActiveMigrating; mState = migrating ? eInactiveMigrating : eInactive; } if (migrating) { // We were waiting for this! Now we can migrate the actor in the correct // thread. RefPtr<IPCBlobInputStreamThread> thread = IPCBlobInputStreamThread::GetOrCreate(); MOZ_ASSERT(thread, "We cannot continue without DOMFile thread."); ResetManager(); thread->MigrateActor(this); return; } // Let's cleanup the workerRef and the pending operation queue. Shutdown(); }
EntityManager::~EntityManager() { ResetManager(); }