Bug 1024669 - Part 1: Annotate crash reports with thread names. r=gsvelto

MozReview-Commit-ID: 4RpAWzTuvPs
This commit is contained in:
Cervantes Yu
2017-02-07 18:57:23 +08:00
parent 8636d0ae7e
commit c2014c712d
30 changed files with 404 additions and 23 deletions

View File

@@ -13,6 +13,7 @@
#include "mozilla/TimeStamp.h"
#include "nsAutoPtr.h"
#include "nsNativeCharsetUtils.h"
#include "nsThreadUtils.h"
/**
* This code uses NSPR stuff and STL containers because it must be detached
@@ -115,7 +116,7 @@ MainThreadIOLoggerImpl::Init()
MainThreadIOLoggerImpl::sIOThreadFunc(void* aArg)
{
AutoProfilerRegister registerThread("MainThreadIOLogger");
PR_SetCurrentThreadName("MainThreadIOLogger");
NS_SetCurrentThreadName("MainThreadIOLogger");
MainThreadIOLoggerImpl* obj = static_cast<MainThreadIOLoggerImpl*>(aArg);
obj->IOThreadFunc();
}