diff --git a/gfx/thebes/gfxFcPlatformFontList.cpp b/gfx/thebes/gfxFcPlatformFontList.cpp index f1b461a4c15f..182712a910d3 100644 --- a/gfx/thebes/gfxFcPlatformFontList.cpp +++ b/gfx/thebes/gfxFcPlatformFontList.cpp @@ -2423,23 +2423,8 @@ gfxFcPlatformFontList::TryLangForGroup(const nsACString& aOSLang, ++pos; } - // We can safely use mLangService->LookupLanguage if we're on the main - // thread, or if we're in a Servo traversal that has locked the cache, - // but not if we're on the font enumeration thread used to populate the - // Font menu in about:preferences. - if (IsInServoTraversalWithoutMainThreadAssertion() || NS_IsMainThread()) { - nsAtom *atom = mLangService->LookupLanguage(aFcLang); - return atom == aLangGroup; - } - - // Off-main-thread/non-servo-traversal version: fall back to - // GetUncachedLanguageGroup to avoid unsafe access to the lang-group - // mapping cache hashtable. - nsAutoCString lowered(aFcLang); - ToLowerCase(lowered); - RefPtr lang = NS_Atomize(lowered); - RefPtr group = mLangService->GetUncachedLanguageGroup(lang); - return group.get() == aLangGroup; + nsAtom *atom = mLangService->LookupLanguage(aFcLang); + return atom == aLangGroup; } void diff --git a/layout/style/ServoUtils.h b/layout/style/ServoUtils.h index fa10f2fe2d8c..71c665c12cac 100644 --- a/layout/style/ServoUtils.h +++ b/layout/style/ServoUtils.h @@ -33,14 +33,6 @@ inline bool IsInServoTraversal() MOZ_ASSERT(sInServoTraversal || NS_IsMainThread()); return sInServoTraversal; } - -inline bool IsInServoTraversalWithoutMainThreadAssertion() -{ - // This is for cases when we _only_ want to query whether we're in Servo - // traversal, without asserting in the case of other non-main-thread callers. - // Use this only if the calling code is safe to use off the main thread. - return sInServoTraversal; -} } // namespace mozilla #define MOZ_DECL_STYLO_CONVERT_METHODS_SERVO(servotype_) \