From 1ce893603a5f2c98a60faf3867e101c0bca053f1 Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Sun, 8 Sep 2019 23:41:54 +0000 Subject: [PATCH] Bug 1569706 - Update incorrect assertion. r=emilio We can end up in here from a style worker thread. But that's safe since we only read data from the FontFaceSet, and the main thread is blocked so writes can't happen underneath us. Differential Revision: https://phabricator.services.mozilla.com/D44589 --HG-- extra : moz-landing-system : lando --- layout/style/FontFaceSet.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/layout/style/FontFaceSet.cpp b/layout/style/FontFaceSet.cpp index d05492c97e73..b257600dc61e 100644 --- a/layout/style/FontFaceSet.cpp +++ b/layout/style/FontFaceSet.cpp @@ -1204,9 +1204,8 @@ RawServoFontFaceRule* FontFaceSet::FindRuleForUserFontEntry( nsresult FontFaceSet::LogMessage(gfxUserFontEntry* aUserFontEntry, const char* aMessage, uint32_t aFlags, nsresult aStatus) { - MOZ_ASSERT(NS_IsMainThread(), - "LogMessage only works on the main thread, due to the Servo_XXX " - "CSSOM calls it makes"); + MOZ_ASSERT(NS_IsMainThread() || + ServoStyleSet::IsCurrentThreadInServoTraversal()); nsCOMPtr console( do_GetService(NS_CONSOLESERVICE_CONTRACTID));