diff --git a/modules/libpref/prefapi.cpp b/modules/libpref/prefapi.cpp index 5c05a19a7143..2365222ee6d8 100644 --- a/modules/libpref/prefapi.cpp +++ b/modules/libpref/prefapi.cpp @@ -26,6 +26,7 @@ #include "mozilla/ArenaAllocatorExtensions.h" #include "mozilla/Logging.h" #include "mozilla/MemoryReporting.h" +#include "mozilla/ServoStyleSet.h" #include "mozilla/dom/PContent.h" #include "mozilla/dom/ContentPrefs.h" #include "nsQuickSort.h" @@ -762,7 +763,7 @@ inInitArray(const char* key) PrefHashEntry* pref_HashTableLookup(const char *key) { #ifndef MOZ_B2G - MOZ_ASSERT(NS_IsMainThread()); + MOZ_ASSERT(NS_IsMainThread() || mozilla::ServoStyleSet::IsInServoTraversal()); #endif MOZ_ASSERT((!XRE_IsContentProcess() || gPhase != START), "pref access before commandline prefs set");