Bug 1356103 - Part 10: Re-enable font metrics querying for ch and ex units in Servo traversal. r=bholley
authorCameron McCormack <cam@mcc.id.au>
Thu, 04 May 2017 16:20:14 +0800
changeset 573138 e282e719b67e6aa87cbbaa98592d0d966e70f2f1
parent 573137 165c49f2d2d97f0fd05862b77d36e182c01bca19
child 573139 94c0595512731f72d2fbf8ca2594d082a7f4ad58
push id57306
push userbmo:emilio+bugs@crisal.io
push dateFri, 05 May 2017 10:08:55 +0000
reviewersbholley
bugs1356103
milestone55.0a1
Bug 1356103 - Part 10: Re-enable font metrics querying for ch and ex units in Servo traversal. r=bholley MozReview-Commit-ID: 9rKsTyfgEIl
layout/style/ServoBindings.cpp
--- a/layout/style/ServoBindings.cpp
+++ b/layout/style/ServoBindings.cpp
@@ -1836,19 +1836,16 @@ AssertIsMainThreadOrServoFontMetricsLock
 
 GeckoFontMetrics
 Gecko_GetFontMetrics(RawGeckoPresContextBorrowed aPresContext,
                      bool aIsVertical,
                      const nsStyleFont* aFont,
                      nscoord aFontSize,
                      bool aUseUserFontSet)
 {
-  // This function is still unsafe due to frobbing DOM and network
-  // off main thread. We currently disable it in Servo, see bug 1356105
-  MOZ_ASSERT(NS_IsMainThread());
   MutexAutoLock lock(*sServoFontMetricsLock);
   GeckoFontMetrics ret;
 
   // Getting font metrics can require some main thread only work to be
   // done, such as work that needs to touch non-threadsafe refcounted
   // objects (like the DOM FontFace/FontFaceSet objects), network loads, etc.
   //
   // To handle this work, font code checks whether we are in a Servo traversal