зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1788596 - Remove extra lock() on UtilityProcessChild r=nika
Differential Revision: https://phabricator.services.mozilla.com/D156482
This commit is contained in:
Родитель
6a92f8d147
Коммит
cb4424182c
|
@ -45,14 +45,13 @@ static StaticRefPtr<UtilityProcessChild> sUtilityProcessChild;
|
||||||
|
|
||||||
UtilityProcessChild::UtilityProcessChild() {
|
UtilityProcessChild::UtilityProcessChild() {
|
||||||
nsDebugImpl::SetMultiprocessMode("Utility");
|
nsDebugImpl::SetMultiprocessMode("Utility");
|
||||||
StaticMutexAutoLock lock(sUtilityProcessChildMutex);
|
|
||||||
sUtilityProcessChild = this;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
UtilityProcessChild::~UtilityProcessChild() = default;
|
UtilityProcessChild::~UtilityProcessChild() = default;
|
||||||
|
|
||||||
/* static */
|
/* static */
|
||||||
RefPtr<UtilityProcessChild> UtilityProcessChild::GetSingleton() {
|
RefPtr<UtilityProcessChild> UtilityProcessChild::GetSingleton() {
|
||||||
|
MOZ_ASSERT(XRE_IsUtilityProcess());
|
||||||
StaticMutexAutoLock lock(sUtilityProcessChildMutex);
|
StaticMutexAutoLock lock(sUtilityProcessChildMutex);
|
||||||
if (!sUtilityProcessChild) {
|
if (!sUtilityProcessChild) {
|
||||||
sUtilityProcessChild = new UtilityProcessChild();
|
sUtilityProcessChild = new UtilityProcessChild();
|
||||||
|
|
|
@ -27,7 +27,7 @@ class UtilityProcessImpl final : public ipc::ProcessChild {
|
||||||
void CleanUp() override;
|
void CleanUp() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
RefPtr<UtilityProcessChild> mUtility = new UtilityProcessChild();
|
RefPtr<UtilityProcessChild> mUtility = UtilityProcessChild::GetSingleton();
|
||||||
|
|
||||||
#if defined(XP_WIN)
|
#if defined(XP_WIN)
|
||||||
mozilla::mscom::ProcessRuntime mCOMRuntime;
|
mozilla::mscom::ProcessRuntime mCOMRuntime;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче