diff --git a/dom/ipc/ContentParent.cpp b/dom/ipc/ContentParent.cpp index f7531f154099..f77509a34821 100644 --- a/dom/ipc/ContentParent.cpp +++ b/dom/ipc/ContentParent.cpp @@ -593,16 +593,16 @@ ProcessID GetTelemetryProcessID(const nsACString& remoteType) { } // anonymous namespace -UniquePtr> +StaticAutoPtr> ContentParent::sJSPluginContentParents; -UniquePtr> ContentParent::sContentParents; +StaticAutoPtr> ContentParent::sContentParents; StaticRefPtr ContentParent::sRecycledE10SProcess; #if defined(XP_LINUX) && defined(MOZ_SANDBOX) -UniquePtr +StaticAutoPtr ContentParent::sSandboxBrokerPolicyFactory; #endif #if defined(XP_MACOSX) && defined(MOZ_SANDBOX) -UniquePtr> ContentParent::sMacSandboxParams; +StaticAutoPtr> ContentParent::sMacSandboxParams; #endif // Set to true when the first content process gets created. @@ -675,11 +675,11 @@ void ContentParent::StartUp() { kFissionOmitBlockListValues); #if defined(XP_LINUX) && defined(MOZ_SANDBOX) - sSandboxBrokerPolicyFactory = MakeUnique(); + sSandboxBrokerPolicyFactory = new SandboxBrokerPolicyFactory(); #endif #if defined(XP_MACOSX) && defined(MOZ_SANDBOX) - sMacSandboxParams = MakeUnique>(); + sMacSandboxParams = new std::vector(); #endif } @@ -1180,8 +1180,7 @@ already_AddRefed ContentParent::GetNewOrUsedJSPluginProcess( if (sJSPluginContentParents) { p = sJSPluginContentParents->Get(aPluginID); } else { - sJSPluginContentParents = - MakeUnique>(); + sJSPluginContentParents = new nsTHashMap(); } if (p) { @@ -2837,7 +2836,7 @@ ContentParent::ContentParent(const nsACString& aRemoteType, int32_t aJSPluginID) // Insert ourselves into the global linked list of ContentParent objects. if (!sContentParents) { - sContentParents = MakeUnique>(); + sContentParents = new LinkedList(); } sContentParents->insertBack(this); diff --git a/dom/ipc/ContentParent.h b/dom/ipc/ContentParent.h index d99686e5d768..e1f75565e02b 100644 --- a/dom/ipc/ContentParent.h +++ b/dom/ipc/ContentParent.h @@ -28,6 +28,7 @@ #include "mozilla/Maybe.h" #include "mozilla/MemoryReportingProcess.h" #include "mozilla/MozPromise.h" +#include "mozilla/StaticPtr.h" #include "mozilla/TimeStamp.h" #include "mozilla/UniquePtr.h" @@ -696,9 +697,9 @@ class ContentParent final : public PContentParent, */ static nsClassHashtable>* sBrowserContentParents; - static UniquePtr> + static mozilla::StaticAutoPtr> sJSPluginContentParents; - static UniquePtr> sContentParents; + static mozilla::StaticAutoPtr> sContentParents; /** * In order to avoid rapidly creating and destroying content processes when @@ -715,7 +716,7 @@ class ContentParent final : public PContentParent, #if defined(XP_MACOSX) && defined(MOZ_SANDBOX) // Cached Mac sandbox params used when launching content processes. - static UniquePtr> sMacSandboxParams; + static mozilla::StaticAutoPtr> sMacSandboxParams; #endif // Set aLoadUri to true to load aURIToLoad and to false to only create the @@ -1590,7 +1591,7 @@ class ContentParent final : public PContentParent, #if defined(XP_LINUX) && defined(MOZ_SANDBOX) mozilla::UniquePtr mSandboxBroker; - static mozilla::UniquePtr + static mozilla::StaticAutoPtr sSandboxBrokerPolicyFactory; #endif