Bug 1323100 - Stop double-registering the IPDL Background thread with the profiler. r?froydnj
MozReview-Commit-ID: 2BlEhqrxdUz
--- a/ipc/glue/BackgroundImpl.cpp
+++ b/ipc/glue/BackgroundImpl.cpp
@@ -1339,18 +1339,16 @@ ParentImpl::ShutdownObserver::Observe(ns
}
NS_IMETHODIMP
ParentImpl::RequestMessageLoopRunnable::Run()
{
AssertIsInMainProcess();
MOZ_ASSERT(mTargetThread);
- char stackBaseGuess;
-
if (NS_IsMainThread()) {
MOZ_ASSERT(mMessageLoop);
if (!sBackgroundThread ||
!SameCOMIdentity(mTargetThread.get(), sBackgroundThread.get())) {
return NS_OK;
}
@@ -1370,18 +1368,16 @@ ParentImpl::RequestMessageLoopRunnable::
NS_WARNING("Failed to dispatch callback runnable!");
}
}
}
return NS_OK;
}
- profiler_register_thread("IPDL Background", &stackBaseGuess);
-
#ifdef DEBUG
{
bool correctThread;
MOZ_ASSERT(NS_SUCCEEDED(mTargetThread->IsOnCurrentThread(&correctThread)));
MOZ_ASSERT(correctThread);
}
#endif
@@ -1409,18 +1405,16 @@ ParentImpl::ShutdownBackgroundThreadRunn
{
AssertIsInMainProcess();
// It is possible that another background thread was created while this thread
// was shutting down. In that case we can't assert anything about
// sBackgroundPRThread and we should not modify it here.
sBackgroundPRThread.compareExchange(PR_GetCurrentThread(), nullptr);
- profiler_unregister_thread();
-
return NS_OK;
}
NS_IMETHODIMP
ParentImpl::ForceCloseBackgroundActorsRunnable::Run()
{
AssertIsInMainProcess();
MOZ_ASSERT(mActorArray);