Bug 1569706 - Update incorrect assertion. r=emilio
authorCameron McCormack <cam@mcc.id.au>
Sun, 08 Sep 2019 23:41:54 +0000
changeset 553496 1b22eebeb4e441b9d90706522e5ba9c47b37198b
parent 553495 95288ceaa9e40ac673e0337db0e9281a9943e32c
child 553497 3be609a9be36ec5b9652f1359f8d1bc4546e0a49
push id12169
push userffxbld-merge
push dateMon, 14 Oct 2019 16:59:29 +0000
treeherdermozilla-beta@c819687300ed [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersemilio
bugs1569706
milestone71.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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
layout/style/FontFaceSet.cpp
--- a/layout/style/FontFaceSet.cpp
+++ b/layout/style/FontFaceSet.cpp
@@ -1199,19 +1199,18 @@ RawServoFontFaceRule* FontFaceSet::FindR
     }
   }
   return nullptr;
 }
 
 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<nsIConsoleService> console(
       do_GetService(NS_CONSOLESERVICE_CONTRACTID));
   if (!console) {
     return NS_ERROR_NOT_AVAILABLE;
   }
 
   nsAutoCString familyName;