Bug 1403473 - Init loggingEnable for hashcompleter. r=dimi, a=sledru
authorThomas Nguyen <tnguyen@mozilla.com>
Fri, 29 Sep 2017 01:46:00 -0400
changeset 434429 e4a0c97b413f2515c26a7022b60dffa89172955b
parent 434428 452ca306a258e8b18c4a2eb3295b37b58a8ecd8b
child 434430 f8ac35ccd7007d01591c17dc1bab835ef45e1664
push id1567
push userjlorenzo@mozilla.com
push dateThu, 02 Nov 2017 12:36:05 +0000
treeherdermozilla-release@e512c14a0406 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdimi, sledru
bugs1403473
milestone57.0
Bug 1403473 - Init loggingEnable for hashcompleter. r=dimi, a=sledru MozReview-Commit-ID: 1BpErwmbgCM
toolkit/components/url-classifier/nsUrlClassifierHashCompleter.js
--- a/toolkit/components/url-classifier/nsUrlClassifierHashCompleter.js
+++ b/toolkit/components/url-classifier/nsUrlClassifierHashCompleter.js
@@ -180,16 +180,18 @@ function HashCompleter() {
   // Whether we have been informed of a shutdown by the shutdown event.
   this._shuttingDown = false;
 
   // A map of gethash URLs to next gethash time in miliseconds
   this._nextGethashTimeMs = {};
 
   Services.obs.addObserver(this, "quit-application");
   Services.prefs.addObserver(PREF_DEBUG_ENABLED, this);
+
+  loggingEnabled = Services.prefs.getBoolPref(PREF_DEBUG_ENABLED);
 }
 
 HashCompleter.prototype = {
   classID: Components.ID("{9111de73-9322-4bfc-8b65-2b727f3e6ec8}"),
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIUrlClassifierHashCompleter,
                                          Ci.nsIRunnable,
                                          Ci.nsIObserver,
                                          Ci.nsISupportsWeakReference,