mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 13:21:05 +00:00
Bug 1883868 - Restrict new codepath to worker threads. CLOSED TREE
So as to not change load timing from stylo threads.
This commit is contained in:
parent
0f00df454f
commit
a789c90976
@ -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"
|
||||
@ -816,7 +817,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,
|
||||
|
Loading…
Reference in New Issue
Block a user