fx-compat: Initial nsIWebBrowserPersist.saveURI() fixes

Will need additional fixes for cookie handling, etc., but this at least
fixes the signature
This commit is contained in:
Dan Stillman 2022-06-17 20:27:46 -04:00
parent 2b41b0127c
commit d90334e883

View file

@ -487,7 +487,35 @@ Zotero.Utilities.Internal = {
cookieSandbox.attachToInterfaceRequestor(wbp.progressListener);
}
wbp.saveURI(uri, null, null, null, null, headers, target, null);
// TODO: Check/fix cookie stuff
var cookieJarSettings = Cc["@mozilla.org/cookieJarSettings;1"]
.createInstance(Ci.nsICookieJarSettings);
//cookieJarSettings.initWithURI(uri, options.incognito);
var loadContext = Cu.createLoadContext();
//loadContext.usePrivateBrowsing = true;
wbp.saveURI(
uri,
// triggeringPrincipal
Services.scriptSecurityManager.createNullPrincipal({}),
// cacheKey
null,
// referrerInfo
null,
// cookieJarSettings
cookieJarSettings,
// postData
null,
// extraHeaders
headers,
// file
target,
// contentPolicyType
Ci.nsIContentPolicy.TYPE_DOCUMENT,
// privacyContext
loadContext
);
},