mirror of
https://github.com/zotero/zotero.git
synced 2026-10-04 02:31:47 +00:00
Serialize _ensureFeedAbstractBrowserExists()
Prevent a potential race condition.
This commit is contained in:
parent
013a814765
commit
fa48e978c7
1 changed files with 2 additions and 2 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue