Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: lib/main.js

Issue 29355271: Noissue - Don't import JavaScript modules into the global scope (includes removing unused module). (Closed)
Patch Set: Created Sept. 29, 2016, 12:05 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« lib/crawler.js ('K') | « lib/crawler.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/main.js
diff --git a/lib/main.js b/lib/main.js
index 1e1dc3cf924adc5ca76d6923ac004bcb9121055d..df9b54a62a138cac1ca095967a0408a267c41388 100644
--- a/lib/main.js
+++ b/lib/main.js
@@ -10,9 +10,9 @@
* @module main
*/
-Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-Cu.import("resource://gre/modules/Services.jsm");
-Cu.import("resource://gre/modules/Promise.jsm");
+const {Services} = Cu.import("resource://gre/modules/Services.jsm", {});
+const {XPCOMUtils} = Cu.import("resource://gre/modules/XPCOMUtils.jsm", {});
+const {Promise} = Cu.import("resource://gre/modules/Promise.jsm", {});
require("commandLine");
let {run} = require("crawler");
« lib/crawler.js ('K') | « lib/crawler.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld