Bug 1323100 - Stop double-registering the IPDL Background thread with the profiler. r?froydnj draft
authorMarkus Stange <mstange@themasta.com>
Wed, 21 Dec 2016 23:07:10 +0100
changeset 456891 b63f74fa3326ea29a6f91997c6ec46909758c803
parent 456890 695816e65429501871da66cfb4fcf6c46ea2680c
child 456892 95bf7ae1196bfb51cbd72099be926d91d4436acf
push id40636
push userbmo:mstange@themasta.com
push dateFri, 06 Jan 2017 12:38:48 +0000
reviewersfroydnj
bugs1323100
milestone53.0a1
Bug 1323100 - Stop double-registering the IPDL Background thread with the profiler. r?froydnj MozReview-Commit-ID: 2BlEhqrxdUz
ipc/glue/BackgroundImpl.cpp
--- 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);