From 5f37447acdfa719cb7fa1f5c5161df52f3bf98c4 Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Mon, 4 Nov 2019 15:04:12 +0100 Subject: Issue #1064 - Part 2: Fix shorthand and services module import. --- security/manager/pki/resources/content/exceptionDialog.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/security/manager/pki/resources/content/exceptionDialog.js b/security/manager/pki/resources/content/exceptionDialog.js index 9d70ebdce..d227c3117 100644 --- a/security/manager/pki/resources/content/exceptionDialog.js +++ b/security/manager/pki/resources/content/exceptionDialog.js @@ -13,7 +13,10 @@ var gChecking; var gBroken; var gNeedReset; -Components.utils.import("resource://gre/modules/PrivateBrowsingUtils.jsm"); +const {interfaces: Ci, classes: Cc, results: Cr, utils: Cu} = Components; + +Cu.import("resource://gre/modules/PrivateBrowsingUtils.jsm"); +Cu.import("resource://gre/modules/Services.jsm"); function initExceptionDialog() { @@ -286,8 +289,8 @@ function addException() { return; } - var overrideService = Components.classes["@mozilla.org/security/certoverride;1"] - .getService(Components.interfaces.nsICertOverrideService); + var overrideService = Cc["@mozilla.org/security/certoverride;1"] + .getService(Ci.nsICertOverrideService); var flags = 0; if (gSSLStatus.isUntrusted) { flags |= overrideService.ERROR_UNTRUSTED; -- cgit v1.2.3