From 4d90fe72bd64d1df79fea15d7ed41a6727fb8fe3 Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Mon, 16 Dec 2024 12:21:55 -0500 Subject: [PATCH] CookieSandbox: Fix XHR interface check Actually broken since fx115. --- chrome/content/zotero/xpcom/cookieSandbox.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/chrome/content/zotero/xpcom/cookieSandbox.js b/chrome/content/zotero/xpcom/cookieSandbox.js index 0b8da0efbf..465a7a6a61 100755 --- a/chrome/content/zotero/xpcom/cookieSandbox.js +++ b/chrome/content/zotero/xpcom/cookieSandbox.js @@ -343,11 +343,15 @@ Zotero.CookieSandbox.Observer = new function() { // Zotero.debug(`CookieSandbox: Found the browser via doc of load group for ${channelURI}`, 5); trackedBy = this.trackedBrowsers.get(browser); } + else if (notificationCallbacks instanceof XMLHttpRequest) { + // Zotero.debug(`CookieSandbox: Found the browser via XHR for ${channelURI}`, 5); + tested = true; + } else { - // try getting as an XHR or nsIWBP + // try getting as an nsIWBP try { - notificationCallbacks.QueryInterface(Components.interfaces.nsIXMLHttpRequest); - // Zotero.debug(`CookieSandbox: Found the browser via XHR or nsIWBP for ${channelURI}`, 5); + notificationCallbacks.QueryInterface(Components.interfaces.nsIWebBrowserPersist); + // Zotero.debug(`CookieSandbox: Found the browser via nsIWBP for ${channelURI}`, 5); tested = true; } catch (e) {}