Bug 1356103 - Part 10: Re-enable font metrics querying for ch and ex units in Servo traversal. r=bholley draft
authorCameron McCormack <cam@mcc.id.au>
Thu, 04 May 2017 16:20:14 +0800
changeset 572582 cfc3cf6266dfcb077f8cfaa1df8d80b1737cf410
parent 572581 e3ff05a6108d4709a21e836d9ab43defdad2ad33
child 572583 32aea4e726c7a68cf8c97051bb83dc09866d5815
push id57115
push userbmo:cam@mcc.id.au
push dateThu, 04 May 2017 10:01:25 +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