зеркало из https://github.com/mozilla/pjs.git
Bustage fix (assertion failure) for bug 319004, handle empty title
This commit is contained in:
Родитель
a60c40ba69
Коммит
af96806526
|
@ -1119,7 +1119,8 @@ nsGlobalHistory::SetPageTitle(nsIURI *aURI, const nsAString& aTitle)
|
|||
NS_ENSURE_ARG_POINTER(aURI);
|
||||
|
||||
nsAutoString titleString(StringHead(aTitle, HISTORY_TITLE_LENGTH_MAX));
|
||||
if (IS_HIGH_SURROGATE(titleString.Last()))
|
||||
if (titleString.Length() < aTitle.Length() &&
|
||||
IS_HIGH_SURROGATE(titleString.Last()))
|
||||
titleString.Truncate(titleString.Length()-1);
|
||||
|
||||
// skip about: URIs to avoid reading in the db (about:blank, especially)
|
||||
|
|
|
@ -1042,7 +1042,8 @@ nsGlobalHistory::SetPageTitle(nsIURI *aURI, const nsAString& aTitle)
|
|||
NS_ENSURE_ARG_POINTER(aURI);
|
||||
|
||||
nsAutoString titleString(StringHead(aTitle, HISTORY_TITLE_LENGTH_MAX));
|
||||
if (IS_HIGH_SURROGATE(titleString.Last()))
|
||||
if (titleString.Length() < aTitle.Length() &&
|
||||
IS_HIGH_SURROGATE(titleString.Last()))
|
||||
titleString.Truncate(titleString.Length()-1);
|
||||
|
||||
// skip about: URIs to avoid reading in the db (about:blank, especially)
|
||||
|
|
Загрузка…
Ссылка в новой задаче