зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1437991 - Reduce scope of GetMainThread warning. r=froydnj
--HG-- extra : rebase_source : ec4e505fdefef42572e05a98348bef75473c8df2
This commit is contained in:
Родитель
221438b032
Коммит
68491ea9df
|
@ -454,7 +454,12 @@ nsThreadManager::NewNamedThread(const nsACString& aName, uint32_t aStackSize,
|
|||
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);
|
||||
|
|
Загрузка…
Ссылка в новой задаче