diff --git a/xpfe/communicator/resources/content/contentAreaUtils.js b/xpfe/communicator/resources/content/contentAreaUtils.js index 005a6e798b0..cab37140f91 100644 --- a/xpfe/communicator/resources/content/contentAreaUtils.js +++ b/xpfe/communicator/resources/content/contentAreaUtils.js @@ -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";