void CheckThreadLocal::check() const { JSContext* cx = TlsContext.get(); MOZ_ASSERT(cx); // As for CheckZoneGroup, in a cooperatively scheduled runtime the active // thread is permitted access to thread local state for other suspended // threads in the same runtime. if (cx->isCooperativelyScheduled()) MOZ_ASSERT(CurrentThreadCanAccessRuntime(cx->runtime())); else MOZ_ASSERT(id == ThisThread::GetId()); }