bug 873421 fix error reporting in page-mark-config handler, r=markh, a=lsblakk
authorShane Caraveo <scaraveo@mozilla.com>
Mon, 03 Jun 2013 15:06:47 -0700
changeset 142809 3deda7a94d8085f0a06112f4c3cbfb80eb7a113a
parent 142808 beaa70e610245d2ca16e8b3b50d74614fcd3fd0f
child 142810 3a0eda0d4d8b3885c35e07deb8ffae43cf07782a
push id2579
push userakeybl@mozilla.com
push dateMon, 24 Jun 2013 18:52:47 +0000
treeherdermozilla-beta@b69b7de8a05a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmarkh, lsblakk
bugs873421
milestone23.0a2
bug 873421 fix error reporting in page-mark-config handler, r=markh, a=lsblakk
toolkit/components/social/SocialService.jsm
--- a/toolkit/components/social/SocialService.jsm
+++ b/toolkit/components/social/SocialService.jsm
@@ -662,22 +662,23 @@ SocialProvider.prototype = {
   _pageMarkInfo: null,
   get pageMarkInfo() {
     return this._pageMarkInfo;
   },
   set pageMarkInfo(data) {
     // Accept *and validate* the page-mark-config message from the provider.
     let promptImages = {};
     let promptMessages = {};
+    let self = this;
     function reportError(reason) {
       Cu.reportError("Invalid page-mark data from provider: " + reason + ": marking is disabled for this provider");
       // and we explicitly reset the page-mark data to null to avoid stale
       // data being used and notify our observers.
-      this._pageMarkInfo = null;
-      Services.obs.notifyObservers(null, "social:page-mark-config", this.origin);
+      self._pageMarkInfo = null;
+      Services.obs.notifyObservers(null, "social:page-mark-config", self.origin);
     }
     if (!data ||
         !data.images || typeof data.images != "object" ||
         !data.messages || typeof data.messages != "object") {
       reportError("data is missing valid 'images' or 'messages' elements");
       return;
     }
     for (let sub of ["marked", "unmarked"]) {