зеркало из https://github.com/mozilla/gecko-dev.git
Bustage fix (assertion failure) for bug 319004, handle empty title
This commit is contained in:
Родитель
348b6d247f
Коммит
eec0e5a3b5
|
@ -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)
|
||||
|
|
Загрузка…
Ссылка в новой задаче