Bug 1558310 - Remove main thread check in nsStandardURL::nsStandardURL() r=dragana

Removing this check would allow us to see leaked URIs created off main thread.
This is OK because we already use a mutex to guard the linkedList

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Valentin Gosu 2019-09-12 16:50:25 +00:00
parent d55c5ff35a
commit 4e6807391a

View File

@ -215,11 +215,9 @@ nsStandardURL::nsStandardURL(bool aSupportsFileURL, bool aTrackURL)
mParser = net_GetStdURLParser();
#ifdef DEBUG_DUMP_URLS_AT_SHUTDOWN
if (NS_IsMainThread()) {
if (aTrackURL) {
StaticMutexAutoLock lock(gAllURLsMutex);
gAllURLs.insertBack(this);
}
if (aTrackURL) {
StaticMutexAutoLock lock(gAllURLsMutex);
gAllURLs.insertBack(this);
}
#endif
}