Bug 1336005 - Add null check when releasing and shutting down background thread r=francois
MozReview-Commit-ID: HKlQLqQH2c9
This commit is contained in:
@@ -1892,6 +1892,11 @@ nsUrlClassifierDBService::Observe(nsISupports *aSubject, const char *aTopic,
|
||||
Shutdown();
|
||||
LOG(("joining background thread"));
|
||||
mWorkerProxy = nullptr;
|
||||
|
||||
if (!gDbBackgroundThread) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsIThread *backgroundThread = gDbBackgroundThread;
|
||||
gDbBackgroundThread = nullptr;
|
||||
backgroundThread->Shutdown();
|
||||
|
||||
Reference in New Issue
Block a user