mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-01 00:32:11 +00:00
Bug 1788596 - Remove extra lock() on UtilityProcessChild r=nika
Differential Revision: https://phabricator.services.mozilla.com/D156482
This commit is contained in:
parent
16c9919af1
commit
c89a2edc37
@ -45,14 +45,13 @@ static StaticRefPtr<UtilityProcessChild> sUtilityProcessChild;
|
||||
|
||||
UtilityProcessChild::UtilityProcessChild() {
|
||||
nsDebugImpl::SetMultiprocessMode("Utility");
|
||||
StaticMutexAutoLock lock(sUtilityProcessChildMutex);
|
||||
sUtilityProcessChild = this;
|
||||
}
|
||||
|
||||
UtilityProcessChild::~UtilityProcessChild() = default;
|
||||
|
||||
/* static */
|
||||
RefPtr<UtilityProcessChild> UtilityProcessChild::GetSingleton() {
|
||||
MOZ_ASSERT(XRE_IsUtilityProcess());
|
||||
StaticMutexAutoLock lock(sUtilityProcessChildMutex);
|
||||
if (!sUtilityProcessChild) {
|
||||
sUtilityProcessChild = new UtilityProcessChild();
|
||||
|
@ -27,7 +27,7 @@ class UtilityProcessImpl final : public ipc::ProcessChild {
|
||||
void CleanUp() override;
|
||||
|
||||
private:
|
||||
RefPtr<UtilityProcessChild> mUtility = new UtilityProcessChild();
|
||||
RefPtr<UtilityProcessChild> mUtility = UtilityProcessChild::GetSingleton();
|
||||
|
||||
#if defined(XP_WIN)
|
||||
mozilla::mscom::ProcessRuntime mCOMRuntime;
|
||||
|
Loading…
Reference in New Issue
Block a user