Bug 1188378 - fix loading share pages when TP is turned on, r=markh, a=sylvestre
authorShane Caraveo <scaraveo@mozilla.com>
Mon, 05 Oct 2015 15:53:51 -0700
changeset 296323 8dc067c112dc12941188a5a5ba68565102b40ea5
parent 296322 928f4a4cf0f34b888f8c7ef49adaac196d2ec03a
child 296324 6d2260ddac363ce1a319c470f6f428356dfb5bbf
push id5245
push userraliiev@mozilla.com
push dateThu, 29 Oct 2015 11:30:51 +0000
treeherdermozilla-beta@dac831dc1bd0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmarkh, sylvestre
bugs1188378
milestone43.0a2
Bug 1188378 - fix loading share pages when TP is turned on, r=markh, a=sylvestre
browser/base/content/social-content.js
--- a/browser/base/content/social-content.js
+++ b/browser/base/content/social-content.js
@@ -80,16 +80,29 @@ SocialErrorListener = {
           failure = aStatus != Components.results.NS_OK;
         }
       }
     }
 
     // Calling cancel() will raise some OnStateChange notifications by itself,
     // so avoid doing that more than once
     if (failure && aStatus != Components.results.NS_BINDING_ABORTED) {
+      // if tp is enabled and we get a failure, ignore failures (ie. STATE_STOP)
+      // on child resources since they *may* have been blocked. We don't have an
+      // easy way to know if a particular url is blocked by TP, only that
+      // something was.
+      if (docShell.hasTrackingContentBlocked) {
+        let frame = docShell.chromeEventHandler;
+        let src = frame.getAttribute("src");
+        if (aRequest && aRequest.name != src) {
+          Cu.reportError("SocialErrorListener ignoring blocked content error for " + aRequest.name);
+          return;
+        }
+      }
+
       aRequest.cancel(Components.results.NS_BINDING_ABORTED);
       this.setErrorPage();
     }
   },
 
   onLocationChange(aWebProgress, aRequest, aLocation, aFlags) {
     if (aRequest && aFlags & Ci.nsIWebProgressListener.LOCATION_CHANGE_ERROR_PAGE) {
       aRequest.cancel(Components.results.NS_BINDING_ABORTED);