Bug 1370732 - Define Cc and Ci in sanitize.js. r=Gijs draft
authorAndrew McCreight <continuation@gmail.com>
Wed, 31 May 2017 14:24:52 -0700
changeset 590412 885158924472962adee8c97a75ca2392f1563630
parent 590411 3e0f64ad6cfc57026d316644ac025dcfb15970b2
child 632241 1dd101b4ab94febc180666e7fd3211cd80e6f318
push id62759
push userbmo:continuation@gmail.com
push dateWed, 07 Jun 2017 20:22:09 +0000
reviewersGijs
bugs1370732
milestone55.0a1
Bug 1370732 - Define Cc and Ci in sanitize.js. r=Gijs These are referred to, but never explicitly defined. Under some circumstances with shared JSM globals, this will cause an error. MozReview-Commit-ID: 5DP2NSRoNML
browser/base/content/sanitize.js
--- a/browser/base/content/sanitize.js
+++ b/browser/base/content/sanitize.js
@@ -23,16 +23,18 @@ XPCOMUtils.defineLazyModuleGetter(this, 
                                   "resource://gre/modules/TelemetryStopwatch.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "console",
                                   "resource://gre/modules/Console.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "Preferences",
                                   "resource://gre/modules/Preferences.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "setTimeout",
                                   "resource://gre/modules/Timer.jsm");
 
+var {Cc: classes, Ci: interfaces} = Components;
+
 /**
  * A number of iterations after which to yield time back
  * to the system.
  */
 const YIELD_PERIOD = 10;
 
 function Sanitizer() {
 }