Bug 1323100 - Always register named threads with the profiler.
MozReview-Commit-ID: I3N1S3Gz6NP
--- a/xpcom/glue/nsThreadUtils.cpp
+++ b/xpcom/glue/nsThreadUtils.cpp
@@ -401,16 +401,20 @@ protected:
};
NS_IMPL_ISUPPORTS(InitNamedThreadRunnable, nsIRunnable)
NS_IMETHODIMP
InitNamedThreadRunnable::Run()
{
PR_SetCurrentThreadName(mName.BeginReading());
+
+ char stackBaseGuess;
+ profiler_register_thread(mName.BeginReading(), &stackBaseGuess);
+
return NS_OK;
}
} // namespace
#endif // !XPCOM_GLUE_AVOID_NSPR
nsresult