From 7bb56107310465fb20ac2acc82e72bb627729b11 Mon Sep 17 00:00:00 2001 From: Manish Goregaokar Date: Tue, 4 Apr 2017 11:11:27 -0700 Subject: [PATCH] Bug 1351200 - Part 1: stylo: Allow fetching prefs on servo traversal threads; r=froydnj MozReview-Commit-ID: 7MMWyX1t5CR --- modules/libpref/prefapi.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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");