зеркало из https://github.com/mozilla/pjs.git
Bug 236627 getReferrer should create uris using the io service
r=neil sr=darin
This commit is contained in:
Родитель
04c853c95d
Коммит
8b8551ca0d
|
@ -78,9 +78,7 @@ function getReferrer(doc)
|
|||
var sourceURL = getContentFrameURI(focusedWindow);
|
||||
|
||||
try {
|
||||
var uri = Components.classes["@mozilla.org/network/standard-url;1"].createInstance(Components.interfaces.nsIURI);
|
||||
uri.spec = sourceURL;
|
||||
return uri;
|
||||
return makeURL(sourceURL);
|
||||
} catch (e) {
|
||||
return null;
|
||||
}
|
||||
|
@ -718,17 +716,6 @@ function makeFilePicker()
|
|||
return Components.classes[fpContractID].createInstance(fpIID);
|
||||
}
|
||||
|
||||
function makeTempFile()
|
||||
{
|
||||
const mimeTypes = "TmpD";
|
||||
const flContractID = "@mozilla.org/file/directory_service;1";
|
||||
const flIID = Components.interfaces.nsIProperties;
|
||||
var fileLocator = Components.classes[flContractID].getService(flIID);
|
||||
var tempFile = fileLocator.get(mimeTypes, Components.interfaces.nsIFile);
|
||||
tempFile.append("~sav" + Math.floor(Math.random() * 1000) + ".tmp");
|
||||
return tempFile;
|
||||
}
|
||||
|
||||
function getMIMEService()
|
||||
{
|
||||
const mimeSvcContractID = "@mozilla.org/mime;1";
|
||||
|
|
Загрузка…
Ссылка в новой задаче