mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-24 11:27:49 +00:00
Bug 720984 - contentAreaUtils.js: getTargetFile leaks gDownloadLastDir into the global scope. r=gavin
This commit is contained in:
parent
a8611d3d04
commit
3216b07af4
@ -563,8 +563,9 @@ function initFileInfo(aFI, aURL, aURLCharset, aDocument,
|
||||
*/
|
||||
function getTargetFile(aFpP, /* optional */ aSkipPrompt, /* optional */ aRelatedURI)
|
||||
{
|
||||
if (typeof gDownloadLastDir != "object")
|
||||
Components.utils.import("resource://gre/modules/DownloadLastDir.jsm");
|
||||
if (!getTargetFile.gDownloadLastDir)
|
||||
Components.utils.import("resource://gre/modules/DownloadLastDir.jsm", getTargetFile);
|
||||
var gDownloadLastDir = getTargetFile.gDownloadLastDir;
|
||||
|
||||
var prefs = getPrefsBrowserDownload("browser.download.");
|
||||
var useDownloadDir = prefs.getBoolPref("useDownloadDir");
|
||||
|
@ -43,6 +43,7 @@ function loadUtilsScript() {
|
||||
let loader = Cc["@mozilla.org/moz/jssubscript-loader;1"].
|
||||
getService(Ci.mozIJSSubScriptLoader);
|
||||
loader.loadSubScript("chrome://global/content/contentAreaUtils.js");
|
||||
Components.utils.import("resource://gre/modules/DownloadLastDir.jsm");
|
||||
}
|
||||
|
||||
do_get_profile();
|
||||
|
Loading…
x
Reference in New Issue
Block a user