Bug 655273 - SHEntries created by history.pushState should have their titles set. r=sicking

This commit is contained in:
Justin Lebar
2011-05-09 14:54:36 -04:00
parent 384d95a1f7
commit 4ef54aa95d
3 changed files with 74 additions and 0 deletions

View File

@@ -9660,6 +9660,11 @@ nsDocShell::AddState(nsIVariant *aData, const nsAString& aTitle,
NS_ENSURE_SUCCESS(newSHEntry->SetDocIdentifier(ourDocIdent),
NS_ERROR_FAILURE);
// Set the new SHEntry's title (bug 655273).
nsString title;
mOSHE->GetTitle(getter_Copies(title));
newSHEntry->SetTitle(title);
// AddToSessionHistory may not modify mOSHE. In case it doesn't,
// we'll just set mOSHE here.
mOSHE = newSHEntry;