Bug 1163021 - add debug assert that directory service usage happens only on the main thread, r=froydnj

Differential Revision: https://phabricator.services.mozilla.com/D45832

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Gijs Kruitbosch 2019-09-13 16:08:48 +00:00
parent da2a2940ad
commit 81785d9cb9

View File

@ -183,6 +183,8 @@ nsDirectoryService::Get(const char* aProp, const nsIID& aUuid, void** aResult) {
return NS_ERROR_INVALID_ARG;
}
MOZ_ASSERT(NS_IsMainThread(), "Do not call dirsvc::get on non-main threads!");
nsDependentCString key(aProp);
nsCOMPtr<nsIFile> cachedFile = mHashtable.Get(key);