зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1663636 - Prevent trying to fetch font faces of destroyed node fronts. r=jdescottes
This isn't really related to EventLoop, but this is another exception thrown when running DAMP. This time related to a request made against an already destroyed NodeFront. Differential Revision: https://phabricator.services.mozilla.com/D89451
This commit is contained in:
Родитель
550422b87a
Коммит
ebe9679c75
|
@ -219,6 +219,10 @@ class ElementStyle {
|
|||
getUsedFontFamilies() {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.ruleView.styleWindow.requestIdleCallback(async () => {
|
||||
if (this.element.isDestroyed()) {
|
||||
resolve([]);
|
||||
return;
|
||||
}
|
||||
try {
|
||||
const fonts = await this.pageStyle.getUsedFontFaces(this.element, {
|
||||
includePreviews: false,
|
||||
|
|
Загрузка…
Ссылка в новой задаче