bug 264917: crash trying to view-source. sr=bzbarsky r=doronr
git-svn-id: svn://10.0.0.236/trunk@163977 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -997,8 +997,8 @@ nsresult CViewSourceHTML::WriteTag(PRInt32 aTagType,const nsAString & aText,PRIn
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
if (kBeforeText[aTagType][0] != 0) {
|
||||
theContext.mITextToken.SetIndirectString(
|
||||
NS_ConvertASCIItoUTF16(kBeforeText[aTagType]));
|
||||
NS_ConvertASCIItoUTF16 beforeText(kBeforeText[aTagType]);
|
||||
theContext.mITextToken.SetIndirectString(beforeText);
|
||||
nsCParserNode theNode(&theContext.mITextToken, 0/*stack token*/);
|
||||
mSink->AddLeaf(theNode);
|
||||
}
|
||||
@@ -1054,8 +1054,8 @@ nsresult CViewSourceHTML::WriteTag(PRInt32 aTagType,const nsAString & aText,PRIn
|
||||
// Tokens are set in error if their ending > is not there, so don't output
|
||||
// the after-text
|
||||
if (!aTagInError && kAfterText[aTagType][0] != 0) {
|
||||
theContext.mITextToken.SetIndirectString(
|
||||
NS_ConvertASCIItoUTF16(kAfterText[aTagType]));
|
||||
NS_ConvertASCIItoUTF16 afterText(kAfterText[aTagType]);
|
||||
theContext.mITextToken.SetIndirectString(afterText);
|
||||
nsCParserNode theNode(&theContext.mITextToken, 0/*stack token*/);
|
||||
mSink->AddLeaf(theNode);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user