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-messaging.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'js/vapi-messaging.js') diff --git a/js/vapi-messaging.js b/js/vapi-messaging.js index e7d1985..170e85d 100644 --- a/js/vapi-messaging.js +++ b/js/vapi-messaging.js @@ -27,9 +27,8 @@ (function () { const {classes: Cc, interfaces: Ci, utils: Cu} = Components; - const {Services} = Cu.import('resource://gre/modules/Services.jsm', null); - const {CallbackWrapper} = - Cu.import('chrome://ematrix/content/CallbackWrapper.jsm', null); + Cu.import('resource://gre/modules/Services.jsm'); + Cu.import('chrome://ematrix/content/CallbackWrapper.jsm'); let vAPI = self.vAPI; // Guaranteed to be initialized by vapi-background.js -- cgit v1.2.3