diff --git a/docshell/base/nsDocShell.cpp b/docshell/base/nsDocShell.cpp index 37f72583bf..e9998e8507 100644 --- a/docshell/base/nsDocShell.cpp +++ b/docshell/base/nsDocShell.cpp @@ -10251,10 +10251,6 @@ nsDocShell::InternalLoad2(nsIURI* aURI, SetDocCurrentStateObj(mOSHE); - // Inform the favicon service that the favicon for oldURI also - // applies to aURI. - CopyFavicon(currentURI, aURI, mInPrivateBrowsing); - nsRefPtr win = mScriptGlobal ? mScriptGlobal->GetCurrentInnerWindowInternal() : nullptr; @@ -10296,6 +10292,10 @@ nsDocShell::InternalLoad2(nsIURI* aURI, } } + // Inform the favicon service that the favicon for oldURI also + // applies to aURI. + CopyFavicon(currentURI, aURI, mInPrivateBrowsing); + return NS_OK; } }