зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1139388 - Remove superfluous locking in the OS X profiler implementation to fix deadlock. (r=mstange)
This commit is contained in:
Родитель
89a333a739
Коммит
61f7f19d8a
|
@ -183,7 +183,6 @@ class SamplerThread : public Thread {
|
||||||
}
|
}
|
||||||
|
|
||||||
static void AddActiveSampler(Sampler* sampler) {
|
static void AddActiveSampler(Sampler* sampler) {
|
||||||
mozilla::MutexAutoLock lock(*Sampler::sRegisteredThreadsMutex);
|
|
||||||
SamplerRegistry::AddActiveSampler(sampler);
|
SamplerRegistry::AddActiveSampler(sampler);
|
||||||
if (instance_ == NULL) {
|
if (instance_ == NULL) {
|
||||||
instance_ = new SamplerThread(sampler->interval());
|
instance_ = new SamplerThread(sampler->interval());
|
||||||
|
@ -192,7 +191,6 @@ class SamplerThread : public Thread {
|
||||||
}
|
}
|
||||||
|
|
||||||
static void RemoveActiveSampler(Sampler* sampler) {
|
static void RemoveActiveSampler(Sampler* sampler) {
|
||||||
mozilla::MutexAutoLock lock(*Sampler::sRegisteredThreadsMutex);
|
|
||||||
instance_->Join();
|
instance_->Join();
|
||||||
//XXX: unlike v8 we need to remove the active sampler after doing the Join
|
//XXX: unlike v8 we need to remove the active sampler after doing the Join
|
||||||
// because we drop the sampler immediately
|
// because we drop the sampler immediately
|
||||||
|
|
Загрузка…
Ссылка в новой задаче