Bug 1361514 - convert XPCLocaleObserver to NS_DECL_OWNINGTHREAD; r=gabor

The pattern we're using here has a name, so let's use that instead.
This commit is contained in:
Nathan Froyd 2017-05-03 11:48:54 -04:00
Родитель 81c338e5a7
Коммит 3261352ea3
1 изменённых файлов: 3 добавлений и 8 удалений

Просмотреть файл

@ -72,9 +72,6 @@ XPCLocaleObserver::Observe(nsISupports* aSubject, const char* aTopic, const char
struct XPCLocaleCallbacks : public JSLocaleCallbacks
{
XPCLocaleCallbacks()
#ifdef DEBUG
: mThread(PR_GetCurrentThread())
#endif
{
MOZ_COUNT_CTOR(XPCLocaleCallbacks);
@ -223,14 +220,12 @@ private:
void AssertThreadSafety() const
{
MOZ_ASSERT(mThread == PR_GetCurrentThread(),
"XPCLocaleCallbacks used unsafely!");
NS_ASSERT_OWNINGTHREAD(XPCLocaleCallbacks);
}
nsCOMPtr<nsICollation> mCollation;
#ifdef DEBUG
PRThread* mThread;
#endif
NS_DECL_OWNINGTHREAD
};
bool