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-contextmenu.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js/vapi-contextmenu.js') diff --git a/js/vapi-contextmenu.js b/js/vapi-contextmenu.js index 28715a8..70229da 100644 --- a/js/vapi-contextmenu.js +++ b/js/vapi-contextmenu.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; // Guaranteed to be initialized by vapi-background.js -- cgit v1.2.3