Bug 1351084 - Making the TabState.jsm collecting 'iconLoadingPrincipal' from browser.mIconLoadingPrincipal. r=mikedeboer

The browser.contentPrincpal will report a null prinicpal instead of the actual
content principal if the tab is not loaded. So the SessionStore will collect a
wrong principal for the 'iconLoadingPrincipal', and it will use this wrong
principal to load favicon when session restoring.

To fix this problem, this patch makes the TabState.jsm to collect
'iconLoadingPrincipal' from browser.mIconLoadingPrincipal which will be the
correct principal for loading favicon.

MozReview-Commit-ID: AYUbHFKaG8v

--HG--
extra : rebase_source : 3e2333f18c221d415bd0e26bc416a841344cef2c
This commit is contained in:
Tim Huang 2017-03-29 10:46:01 +08:00
parent 043d85c921
commit 8f6d9f30c3

View File

@ -126,7 +126,7 @@ var TabStateInternal = {
// Store the serialized contentPrincipal of this tab to use for the icon.
if (!("iconLoadingPrincipal" in tabData)) {
tabData.iconLoadingPrincipal = Utils.serializePrincipal(browser.contentPrincipal);
tabData.iconLoadingPrincipal = Utils.serializePrincipal(browser.mIconLoadingPrincipal);
}
// If there is a userTypedValue set, then either the user has typed something