author | Eric Rahm <erahm@mozilla.com> |
Fri, 04 Jan 2019 15:41:52 -0800 | |
changeset 453841 | a70165566e3b178a252aae5046fbb48540c90dda |
parent 453840 | b3b520f039357af92792d733b0560404dc9c09ed |
child 453842 | 1abbb5d43328bff63871664e4caac4563ed4c0c6 |
push id | 76039 |
push user | cbrindusan@mozilla.com |
push date | Mon, 14 Jan 2019 21:54:07 +0000 |
treeherder | autoland@7f08c65a8bd3 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | froydnj |
bugs | 1437991 |
milestone | 66.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/xpcom/threads/nsThreadManager.cpp +++ b/xpcom/threads/nsThreadManager.cpp @@ -449,17 +449,22 @@ nsThreadManager::NewNamedThread(const ns thr.forget(aResult); return NS_OK; } NS_IMETHODIMP nsThreadManager::GetMainThread(nsIThread** aResult) { // Keep this functioning during Shutdown - if (NS_WARN_IF(!mMainThread)) { + if (!mMainThread) { + if (!NS_IsMainThread()) { + NS_WARNING( + "Called GetMainThread but there isn't a main thread and " + "we're not the main thread."); + } return NS_ERROR_NOT_INITIALIZED; } NS_ADDREF(*aResult = mMainThread); return NS_OK; } NS_IMETHODIMP nsThreadManager::GetCurrentThread(nsIThread** aResult) {