Backed out changeset 5516f3e7b817 (bug 1511903) for browser-chrome failures in browser/components/sessionstore/test/browser_attributes.js. CLOSED TREE
authorDorel Luca <dluca@mozilla.com>
Tue, 04 Dec 2018 15:20:13 +0200
changeset 508504 f3c5235419537c434139d62f9bbebc1165c806b7
parent 508503 8f21a826a2b69e2778948de40d505bf4a24a5200
child 508505 2cc09eeb4898c1245d9ae01c95b8ce5d622c8122
push id1905
push userffxbld-merge
push dateMon, 21 Jan 2019 12:33:13 +0000
treeherdermozilla-release@c2fca1944d8c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1511903
milestone65.0a1
backs out5516f3e7b817f0ec3543d0fa6295c01e4363238b
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out changeset 5516f3e7b817 (bug 1511903) for browser-chrome failures in browser/components/sessionstore/test/browser_attributes.js. CLOSED TREE
browser/base/content/browser.js
browser/modules/FaviconLoader.jsm
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -3730,49 +3730,31 @@ const DOMEventHandler = {
   clearPendingIcon(aBrowser) {
     let tab = gBrowser.getTabForBrowser(aBrowser);
     tab.removeAttribute("pendingicon");
   },
 
   setIconFromLink(aBrowser, aPageURL, aOriginalURL, aCanUseForTab, aExpiration, aIconURL) {
     let tab = gBrowser.getTabForBrowser(aBrowser);
     if (!tab) {
-      return;
-    }
-
-    if (aCanUseForTab) {
-      this.clearPendingIcon(aBrowser);
-    }
-
-    let iconURI;
-    try {
-      iconURI = Services.io.newURI(aIconURL);
-    } catch (ex) {
-      Cu.reportError(ex);
-      return;
-    }
-    if (iconURI.scheme != "data") {
-      try {
-        Services.scriptSecurityManager.checkLoadURIWithPrincipal(
-          aBrowser.contentPrincipal, iconURI, 0);
-      } catch (ex) {
-        return;
-      }
+      return false;
     }
     try {
       PlacesUIUtils.loadFavicon(aBrowser, Services.scriptSecurityManager.getSystemPrincipal(),
                                 makeURI(aPageURL), makeURI(aOriginalURL),
-                                aExpiration, iconURI);
+                                aExpiration, makeURI(aIconURL));
     } catch (ex) {
       Cu.reportError(ex);
     }
 
     if (aCanUseForTab) {
+      this.clearPendingIcon(aBrowser);
       gBrowser.setIcon(tab, aIconURL, aOriginalURL);
     }
+    return true;
   },
 
   addSearch(aBrowser, aEngine, aURL) {
     let tab = gBrowser.getTabForBrowser(aBrowser);
     if (!tab)
       return;
 
     BrowserSearch.addEngine(aBrowser, aEngine, makeURI(aURL));
--- a/browser/modules/FaviconLoader.jsm
+++ b/browser/modules/FaviconLoader.jsm
@@ -418,22 +418,16 @@ class IconLoader {
   }
 
   async load(iconInfo) {
     if (this._loader) {
       this._loader.cancel();
     }
 
     if (LOCAL_FAVICON_SCHEMES.includes(iconInfo.iconUri.scheme)) {
-      // We need to do a manual security check because the channel won't do
-      // it for us.
-      try {
-        Services.scriptSecurityManager.checkLoadURIWithPrincipal(
-          iconInfo.node.nodePrincipal, iconInfo.iconUri, 0);
-      } catch (ex) { return; }
       this.mm.sendAsyncMessage("Link:SetIcon", {
         pageURL: iconInfo.pageUri.spec,
         originalURL: iconInfo.iconUri.spec,
         canUseForTab: !iconInfo.isRichIcon,
         expiration: undefined,
         iconURL: iconInfo.iconUri.spec,
       });
       return;