From 85b111de4ae27d5d94bab99e2d4f304cbe835d13 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 f2aad4f83c..b68a27a449 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"); @@ -181,7 +181,7 @@ }); } return Promise.resolve(); - } + }); _discardFeedAbstractBrowser() { if (this._feedAbstractBrowser) {