Bug 566738 - Make setting titles asynchronous. r=sdwilsh r=mak sr=bz
This commit is contained in:
@@ -4704,11 +4704,16 @@ nsDocShell::SetTitle(const PRUnichar * aTitle)
|
||||
treeOwnerAsWin->SetTitle(aTitle);
|
||||
}
|
||||
|
||||
if (mGlobalHistory && mCurrentURI && mLoadType != LOAD_ERROR_PAGE) {
|
||||
mGlobalHistory->SetPageTitle(mCurrentURI, nsString(mTitle));
|
||||
if (mCurrentURI && mLoadType != LOAD_ERROR_PAGE) {
|
||||
nsCOMPtr<IHistory> history = services::GetHistoryService();
|
||||
if (history) {
|
||||
history->SetURITitle(mCurrentURI, mTitle);
|
||||
}
|
||||
else if (mGlobalHistory) {
|
||||
mGlobalHistory->SetPageTitle(mCurrentURI, nsString(mTitle));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Update SessionHistory with the document's title.
|
||||
if (mOSHE && mLoadType != LOAD_BYPASS_HISTORY &&
|
||||
mLoadType != LOAD_ERROR_PAGE) {
|
||||
|
||||
Reference in New Issue
Block a user