fx-compat: Fix attaching CookieSandbox to a browser

This commit is contained in:
Abe Jellinek 2023-04-14 11:27:09 -04:00
parent 667058204d
commit b2947aede0

View file

@ -336,8 +336,7 @@ Zotero.CookieSandbox.Observer = new function() {
} else {
// try the browser
try {
browser = notificationCallbacks.getInterface(Ci.nsIWebNavigation)
.QueryInterface(Ci.nsIDocShell).chromeEventHandler;
browser = notificationCallbacks.getInterface(Ci.nsILoadContext).topFrameElement;
} catch(e) {}
if(browser) {
tested = true;