From 95559a0c624bb7b7787703aede118349c7cf882a Mon Sep 17 00:00:00 2001 From: Sylvester Keil Date: Thu, 2 Aug 2018 13:11:15 +0200 Subject: [PATCH] Use Services.io getter --- chrome/content/zotero/xpcom/locateManager.js | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/chrome/content/zotero/xpcom/locateManager.js b/chrome/content/zotero/xpcom/locateManager.js index 71f8f11569..66b83913b0 100644 --- a/chrome/content/zotero/xpcom/locateManager.js +++ b/chrome/content/zotero/xpcom/locateManager.js @@ -29,16 +29,12 @@ Zotero.LocateManager = new function() { var _jsonFile; var _locateEngines; - var _ios; var _timer; /** * Read locateEngines JSON file to initialize locate manager */ this.init = async function() { - _ios = Components.classes["@mozilla.org/network/io-service;1"]. - getService(Components.interfaces.nsIIOService); - _jsonFile = _getLocateFile(); try { @@ -271,7 +267,7 @@ Zotero.LocateManager = new function() { * Theoretically implements nsISearchSubmission */ var LocateSubmission = function(uri, postData) { - this.uri = _ios.newURI(uri, null, null); + this.uri = Services.io.newURI(uri, null, null); this.postData = postData; } @@ -447,7 +443,7 @@ Zotero.LocateManager = new function() { "_removeIcon":function() { if(!this.icon) return; - var uri = _ios.newURI(this.icon, null, null); + var uri = Services.io.newURI(this.icon, null, null); var file = uri.QueryInterface(Components.interfaces.nsIFileURL).file; if(file.exists()) file.remove(null); }, @@ -492,4 +488,4 @@ Zotero.LocateManager = new function() { this.icon = OS.Path.toFileURI(iconFile); } } -} \ No newline at end of file +}