Bug 947583 - Fix "this.updateProviderURLs is not a function" when toggling "Block reported attack sites" preference r=dolske a=lsblakk
authorTim Taubert <ttaubert@mozilla.com>
Sat, 07 Dec 2013 09:50:19 +0100
changeset 167702 b6a132d3f4dfef41d6b2596c4c172b9cf9a39b74
parent 167701 0ecb757f94de7e8a5effbd35d32fbf9bc94c0d2a
child 167703 fb0113dfcd46b6cd1b2724b46b5b47014e7916b9
push id428
push userbbajaj@mozilla.com
push dateTue, 28 Jan 2014 00:16:25 +0000
treeherdermozilla-release@cd72a7ff3a75 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdolske, lsblakk
bugs947583
milestone27.0
Bug 947583 - Fix "this.updateProviderURLs is not a function" when toggling "Block reported attack sites" preference r=dolske a=lsblakk
toolkit/components/url-classifier/SafeBrowsing.jsm
--- a/toolkit/components/url-classifier/SafeBrowsing.jsm
+++ b/toolkit/components/url-classifier/SafeBrowsing.jsm
@@ -30,17 +30,17 @@ function log(...stuff) {
 this.SafeBrowsing = {
 
   init: function() {
     if (this.initialized) {
       log("Already initialized");
       return;
     }
 
-    Services.prefs.addObserver("browser.safebrowsing", this.readPrefs, false);
+    Services.prefs.addObserver("browser.safebrowsing", this.readPrefs.bind(this), false);
     this.readPrefs();
 
     // Register our two types of tables, and add custom Mozilla entries
     let listManager = Cc["@mozilla.org/url-classifier/listmanager;1"].
                       getService(Ci.nsIUrlListManager);
     listManager.registerTable(phishingList, false);
     listManager.registerTable(malwareList, false);
     listManager.registerTable(downloadBlockList, false);