From fa48e978c7001a3b3b487f738756600e312fe23d Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Wed, 18 Dec 2024 12:20:00 -0500 Subject: [PATCH] Serialize _ensureFeedAbstractBrowserExists() Prevent a potential race condition. --- chrome/content/zotero/elements/abstractBox.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chrome/content/zotero/elements/abstractBox.js b/chrome/content/zotero/elements/abstractBox.js index f5507f65bf..19e0119e34 100644 --- a/chrome/content/zotero/elements/abstractBox.js +++ b/chrome/content/zotero/elements/abstractBox.js @@ -149,7 +149,7 @@ this._abstractField.setAttribute('aria-label', Zotero.ItemFields.getLocalizedString('abstractNote')); } - async _ensureFeedAbstractBrowserExists() { + _ensureFeedAbstractBrowserExists = Zotero.Utilities.Internal.serial(async () => { if (!this._feedAbstractBrowser) { // dynamically create a browser element to avoid spawning a process for every tab (#4530) this._feedAbstractBrowser = document.createXULElement("browser"); @@ -184,7 +184,7 @@ }); } return Promise.resolve(); - } + }); _discardFeedAbstractBrowser() { if (this._feedAbstractBrowser) {