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

Unified Diff: lib/crawler.js

Issue 29355271: Noissue - Don't import JavaScript modules into the global scope (includes removing unused module). (Closed)
Patch Set: address comments Created Sept. 29, 2016, 8:56 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
« no previous file with comments | « lib/commandLine.js ('k') | lib/main.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/crawler.js
diff --git a/lib/crawler.js b/lib/crawler.js
index c090507357976205848dc979e1a00e7baa5b40ef..4a39784f414862cc3aab0f2cea6a46ccc5e69c70 100644
--- a/lib/crawler.js
+++ b/lib/crawler.js
@@ -10,9 +10,10 @@
* @module crawler
*/
-Cu.import("resource://gre/modules/Services.jsm");
-Cu.import("resource://gre/modules/Task.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 {Task} = Cu.import("resource://gre/modules/Task.jsm", {});
+const {Promise} = Cu.import("resource://gre/modules/Promise.jsm", {});
function abprequire(module)
{
« no previous file with comments | « lib/commandLine.js ('k') | lib/main.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld