Bug 1356103 - Part 10: Re-enable font metrics querying for ch and ex units in Servo traversal. r=bholley
MozReview-Commit-ID: 9rKsTyfgEIl
--- 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