Fix hang when saving pages with non-ASCII characters in URLs. b=191965 r=adamlock sr=bzbarsky a=asa

git-svn-id: svn://10.0.0.236/trunk@137679 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
dbaron%dbaron.org
2003-02-11 20:28:44 +00:00
parent 2cccec9239
commit 39e0d8adae

View File

@@ -2865,7 +2865,7 @@ nsWebBrowserPersist::StoreURIAttribute(
attrNode->GetNodeValue(oldValue);
if (!oldValue.IsEmpty())
{
nsCAutoString oldCValue; oldCValue.AssignWithConversion(oldValue);
NS_ConvertUCS2toUTF8 oldCValue(oldValue);
return StoreURI(oldCValue.get(), aNeedsPersisting, aData);
}
}
@@ -2995,7 +2995,7 @@ nsWebBrowserPersist::FixupAnchor(nsIDOMNode *aNode)
{
nsString oldValue;
attrNode->GetNodeValue(oldValue);
nsCString oldCValue; oldCValue.AssignWithConversion(oldValue);
NS_ConvertUCS2toUTF8 oldCValue(oldValue);
// Skip empty values and self-referencing bookmarks
if (oldCValue.IsEmpty() || oldCValue.CharAt(0) == '#')