diff options
author | Alessio Vanni <vannilla@firemail.cc> | 2019-07-04 17:33:06 +0200 |
---|---|---|
committer | Alessio Vanni <vannilla@firemail.cc> | 2019-07-04 17:33:06 +0200 |
commit | 9d87f8f864b28d182af9659a3095433adb4b0126 (patch) | |
tree | d0c1f6c22ea84802d0741fc66f31e84eebf092af /js/vapi-background.js | |
parent | e48dfcaa6bfd70c9d5eb075eeae164d230ee539b (diff) | |
download | ematrix-9d87f8f864b28d182af9659a3095433adb4b0126.tar.lz ematrix-9d87f8f864b28d182af9659a3095433adb4b0126.tar.xz ematrix-9d87f8f864b28d182af9659a3095433adb4b0126.zip |
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.
Diffstat (limited to 'js/vapi-background.js')
-rw-r--r-- | js/vapi-background.js | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/js/vapi-background.js b/js/vapi-background.js index 0c14992..3f73af7 100644 --- a/js/vapi-background.js +++ b/js/vapi-background.js @@ -32,9 +32,8 @@ (function () { const {classes: Cc, interfaces: Ci, utils: Cu} = Components; - const {Services} = Cu.import('resource://gre/modules/Services.jsm', null); - const {HTTPRequestHeaders} = - Cu.import('chrome://ematrix/content/HttpRequestHeaders.jsm', null); + Cu.import('resource://gre/modules/Services.jsm'); + Cu.import('chrome://ematrix/content/HttpRequestHeaders.jsm'); let vAPI = self.vAPI; // Guaranteed to be initialized by vapi-core.js |