diff --git a/chrome/content/zotero/xpcom/cookieSandbox.js b/chrome/content/zotero/xpcom/cookieSandbox.js index be3906978f..0b8da0efbf 100755 --- a/chrome/content/zotero/xpcom/cookieSandbox.js +++ b/chrome/content/zotero/xpcom/cookieSandbox.js @@ -170,7 +170,10 @@ Zotero.CookieSandbox.prototype = { * @param {nsIInterfaceRequestor} ir */ "attachToInterfaceRequestor": function(ir) { - Zotero.CookieSandbox.Observer.trackedInterfaceRequestors.set(ir.QueryInterface(Components.interfaces.nsIInterfaceRequestor), this); + if (typeof ir.QueryInterface === 'function') { + ir = ir.QueryInterface(Components.interfaces.nsIInterfaceRequestor); + } + Zotero.CookieSandbox.Observer.trackedInterfaceRequestors.set(ir, this); }, /** @@ -413,4 +416,4 @@ Zotero.CookieSandbox.Observer = new function() { Zotero.debug("CookieSandbox: Slurped cookies from "+channelURI, 5); } } -} \ No newline at end of file +}