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 174295 4a9ff6555f3f1b7362d695c8ae1507c6161e6682
parent 174294 f81e19286279a26bafc7ba611ff89e20b37ce694
child 174296 9f57de88c34152c21e76dc0987e8381f1dbac2c5
push id3224
push userlsblakk@mozilla.com
push dateTue, 04 Feb 2014 01:06:49 +0000
treeherdermozilla-beta@60c04d0987f1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdolske, lsblakk
bugs947583
milestone28.0a2
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);