Commit 6520e60d authored by Carsten "Tomcat" Book's avatar Carsten "Tomcat" Book
Browse files

Merge mozilla-central to autoland

parents 8f2af4af d2c3fe7f
Loading
Loading
Loading
Loading
+24 −8
Original line number Diff line number Diff line
@@ -853,6 +853,15 @@
        </body>
      </method>

      <field name="serializationHelper">
        Cc["@mozilla.org/network/serialization-helper;1"]
          .getService(Ci.nsISerializationHelper);
      </field>

      <field name="mIconLoadingPrincipal">
        null
      </field>

      <method name="setIcon">
        <parameter name="aTab"/>
        <parameter name="aURI"/>
@@ -861,26 +870,33 @@
          <![CDATA[
            let browser = this.getBrowserForTab(aTab);
            browser.mIconURL = aURI instanceof Ci.nsIURI ? aURI.spec : aURI;
            let loadingPrincipal = aLoadingPrincipal
              ? aLoadingPrincipal
              : Services.scriptSecurityManager.getSystemPrincipal();

            if (aURI) {
              if (!(aURI instanceof Ci.nsIURI)) {
                aURI = makeURI(aURI);
              }
              // We do not serialize the principal from within SessionStore.jsm,
              // hence if aLoadingPrincipal is null we default to the
              // systemPrincipal which will allow the favicon to load.
              let loadingPrincipal = aLoadingPrincipal
                ? aLoadingPrincipal
                : Services.scriptSecurityManager.getSystemPrincipal();
              PlacesUIUtils.loadFavicon(browser, loadingPrincipal, aURI);
            }

            let sizedIconUrl = browser.mIconURL || "";
            if (sizedIconUrl != aTab.getAttribute("image")) {
              if (sizedIconUrl)
              if (sizedIconUrl) {
                aTab.setAttribute("image", sizedIconUrl);
              else
                if (!browser.mIconLoadingPrincipal ||
                    !browser.mIconLoadingPrincipal.equals(loadingPrincipal)) {
                  aTab.setAttribute("iconLoadingPrincipal",
                    this.serializationHelper.serializeToString(loadingPrincipal));
                  browser.mIconLoadingPrincipal = loadingPrincipal;
                }
              }
              else {
                aTab.removeAttribute("image");
                aTab.removeAttribute("iconLoadingPrincipal");
                delete browser.mIconLoadingPrincipal;
              }
              this._tabAttrModified(aTab, ["image"]);
            }

+1 −0
Original line number Diff line number Diff line
@@ -543,6 +543,7 @@ function test() {
        yield expectNoObserverCalled();
      }
    }).then(finish, ex => {
     Cu.reportError(ex);
     ok(false, "Unexpected Exception: " + ex);
     finish();
    });
+1 −0
Original line number Diff line number Diff line
@@ -93,6 +93,7 @@ function test() {
        yield test.run();
      }
    }).then(finish, ex => {
     Cu.reportError(ex);
     ok(false, "Unexpected Exception: " + ex);
     finish();
    });
+1 −0
Original line number Diff line number Diff line
@@ -262,6 +262,7 @@ function test() {
        yield expectNoObserverCalled();
      }
    }).then(finish, ex => {
     Cu.reportError(ex);
     ok(false, "Unexpected Exception: " + ex);
     finish();
    });
+1 −0
Original line number Diff line number Diff line
@@ -95,6 +95,7 @@ function test() {
        yield expectNoObserverCalled();
      }
    }).then(finish, ex => {
     Cu.reportError(ex);
     ok(false, "Unexpected Exception: " + ex);
     finish();
    });
Loading