Bug 1371132 - Convert NS_GetCurrentThread calls in parser/ (r=hsivonen)

MozReview-Commit-ID: Cn1h0iK0Brl
This commit is contained in:
Bill McCloskey
2017-06-07 16:23:29 -07:00
parent 8508cf97ab
commit 19d1323fdd
4 changed files with 20 additions and 25 deletions

View File

@@ -27,7 +27,7 @@ nsHtml5AtomTable::nsHtml5AtomTable()
: mRecentlyUsedParserAtoms{}
{
#ifdef DEBUG
NS_GetMainThread(getter_AddRefs(mPermittedLookupThread));
mPermittedLookupEventTarget = mozilla::GetCurrentThreadSerialEventTarget();
#endif
}
@@ -40,9 +40,7 @@ nsHtml5AtomTable::GetAtom(const nsAString& aKey)
{
#ifdef DEBUG
{
nsCOMPtr<nsIThread> currentThread;
NS_GetCurrentThread(getter_AddRefs(currentThread));
NS_ASSERTION(mPermittedLookupThread == currentThread, "Wrong thread!");
MOZ_ASSERT(mPermittedLookupEventTarget->IsOnCurrentThread());
}
#endif