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: 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
« 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..933e4fe84c6c0f5b39fe7595894ad93a4fa48d08 100644
--- a/lib/crawler.js
+++ b/lib/crawler.js
@@ -10,9 +10,9 @@
* @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", {});
Wladimir Palant 2016/09/29 18:19:28 You cannot remove Promise.jsm without getting rid
sergei 2016/09/29 21:00:18 Restored. Sorry, overlooked it, thought last defe
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