Bug 1434206 - Assert that gethash processing happens on the right thread. r=gcp

MozReview-Commit-ID: FbF8LzCZ3XO
This commit is contained in:
Francois Marier
2018-05-11 11:47:26 -07:00
parent 978f983eec
commit 6f76ad1921

View File

@@ -876,6 +876,11 @@ Classifier::ApplyUpdatesForeground(nsresult aBackgroundRv,
nsresult
Classifier::ApplyFullHashes(nsTArray<TableUpdate*>* aUpdates)
{
MOZ_ASSERT(NS_GetCurrentThread() != mUpdateThread,
"ApplyFullHashes() MUST NOT be called on update thread");
MOZ_ASSERT(!NS_IsMainThread(),
"ApplyFullHashes() must be called on the classifier worker thread.");
LOG(("Applying %zu table gethashes.", aUpdates->Length()));
ScopedUpdatesClearer scopedUpdatesClearer(aUpdates);