diff --git a/tools/profiler/gecko/ProfilerParent.cpp b/tools/profiler/gecko/ProfilerParent.cpp index eff0898e3829..2d3e3c10ed7d 100644 --- a/tools/profiler/gecko/ProfilerParent.cpp +++ b/tools/profiler/gecko/ProfilerParent.cpp @@ -506,13 +506,13 @@ ProfilerParentTracker* ProfilerParentTracker::GetInstance() { // The main instance pointer, it will be initialized at most once, before // XPCOMShutdownThreads. - static UniquePtr instance = nullptr; + static StaticAutoPtr instance; if (MOZ_UNLIKELY(!instance)) { if (PastShutdownPhase(ShutdownPhase::XPCOMShutdownThreads)) { return nullptr; } - instance = MakeUnique(); + instance = new ProfilerParentTracker(); // The tracker should get destroyed before threads are shutdown, because its // destruction closes extant channels, which could trigger promise