From 2e0a10f7326faede3359228a3736183f7ae440b7 Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Wed, 2 Jul 2025 10:24:09 -0400 Subject: [PATCH] Remove Zotero.spawn() This method relied on Bluebird and can be replaced by just awaiting an async function. --- chrome/content/zotero/xpcom/utilities_internal.js | 7 ------- chrome/content/zotero/xpcom/zotero.js | 4 ---- 2 files changed, 11 deletions(-) diff --git a/chrome/content/zotero/xpcom/utilities_internal.js b/chrome/content/zotero/xpcom/utilities_internal.js index 31b93cf189..d8617babbc 100644 --- a/chrome/content/zotero/xpcom/utilities_internal.js +++ b/chrome/content/zotero/xpcom/utilities_internal.js @@ -1823,13 +1823,6 @@ Zotero.Utilities.Internal = { }; }, - spawn: function (generator, thisObject) { - if (thisObject) { - return generator.bind(thisObject)(); - } - return generator(); - }, - /** * Defines property on the object * More compact way to do Object.defineProperty diff --git a/chrome/content/zotero/xpcom/zotero.js b/chrome/content/zotero/xpcom/zotero.js index 508eae7618..0daea6d5ec 100644 --- a/chrome/content/zotero/xpcom/zotero.js +++ b/chrome/content/zotero/xpcom/zotero.js @@ -1582,10 +1582,6 @@ const { CommandLineOptions } = ChromeUtils.importESModule("chrome://zotero/conte return Zotero.Utilities.Internal.serial(fn); } - this.spawn = function (generator, thisObject) { - return Zotero.Utilities.Internal.spawn(generator, thisObject); - } - /** * Show Zotero pane overlay and progress bar in all windows *