Commit a662a9a8 authored by Cosmin Sabou's avatar Cosmin Sabou
Browse files

Bug 1883868 - Restrict new codepath to worker threads. a=dsmith

So as to not change load timing from stylo threads.
parent 2da0b9dd
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@
#include "mozilla/gfx/2D.h"
#include "gfxPlatformFontList.h"
#include "mozilla/PostTraversalTask.h"
#include "mozilla/dom/WorkerCommon.h"
#include "gfxOTSUtils.h"
#include "nsIFontLoadCompleteCallback.h"
#include "nsProxyRelease.h"
@@ -789,7 +790,7 @@ void gfxUserFontEntry::Load() {
  if (mUserFontLoadState != STATUS_NOT_LOADED) {
    return;
  }
  if (!NS_IsMainThread()) {
  if (dom::IsCurrentThreadRunningWorker()) {
    // TODO: Maybe support loading the font entry in workers, at least for
    // buffers or other sync sources?
    NS_DispatchToMainThread(NewRunnableMethod("gfxUserFontEntry::Load", this,