From 6fd25419a912cc63eaebc726dbe0dd3c446cf264 Mon Sep 17 00:00:00 2001 From: Sylvester Keil Date: Thu, 2 Aug 2018 23:05:17 +0200 Subject: [PATCH] Use Services.io getter --- chrome/content/zotero/xpcom/quickCopy.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/chrome/content/zotero/xpcom/quickCopy.js b/chrome/content/zotero/xpcom/quickCopy.js index 5bd968bf87..1ff555b782 100644 --- a/chrome/content/zotero/xpcom/quickCopy.js +++ b/chrome/content/zotero/xpcom/quickCopy.js @@ -164,11 +164,9 @@ Zotero.QuickCopy = new function() { return quickCopyPref; } - var ioService = Components.classes["@mozilla.org/network/io-service;1"] - .getService(Components.interfaces.nsIIOService); var nsIURI; try { - nsIURI = ioService.newURI(url, null, null); + nsIURI = Services.io.newURI(url, null, null); // Accessing some properties may throw for URIs that do not support those // parts. E.g. hostPort throws NS_ERROR_FAILURE for about:blank var urlHostPort = nsIURI.hostPort;