From 9d87f8f864b28d182af9659a3095433adb4b0126 Mon Sep 17 00:00:00 2001 From: Alessio Vanni Date: Thu, 4 Jul 2019 17:33:06 +0200 Subject: Change how modules are imported I can't really find a reason why the returned value is preferred over the normal importing process. Additionally, there's a good chance importing Services.jsm can be done only once at the start of everything, instead of binding each object to a separate closure. --- js/vapi-core.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js/vapi-core.js') diff --git a/js/vapi-core.js b/js/vapi-core.js index 419955b..c904ff2 100644 --- a/js/vapi-core.js +++ b/js/vapi-core.js @@ -27,7 +27,7 @@ (function () { const {classes: Cc, interfaces: Ci, utils: Cu} = Components; - const {Services} = Cu.import('resource://gre/modules/Services.jsm', null); + Cu.import('resource://gre/modules/Services.jsm'); let vAPI = self.vAPI = self.vAPI || {}; -- cgit v1.2.3