mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-02 18:08:58 +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() {
|
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;
|
||||||
|
Loading…
Reference in New Issue
Block a user