Bug 525094 - Avoid shadowing member fields with local variables in the HTML5 parser. rs=sicking.

This commit is contained in:
Henri Sivonen
2009-12-15 15:19:09 +02:00
parent b7897a784d
commit cede95ab18
4 changed files with 4 additions and 17 deletions

View File

@@ -222,18 +222,6 @@ nsHtml5Tokenizer::appendStrBuf(PRUnichar c)
strBuf[strBufLen++] = c;
}
void
nsHtml5Tokenizer::appendStrBufForceWrite(PRUnichar c)
{
if (strBufLen == strBuf.length) {
jArray<PRUnichar,PRInt32> newBuf = jArray<PRUnichar,PRInt32>(strBuf.length + NS_HTML5TOKENIZER_BUFFER_GROW_BY);
nsHtml5ArrayCopy::arraycopy(strBuf, newBuf, strBuf.length);
strBuf.release();
strBuf = newBuf;
}
strBuf[strBufLen++] = c;
}
nsString*
nsHtml5Tokenizer::strBufToString()
{
@@ -413,8 +401,8 @@ void
nsHtml5Tokenizer::addAttributeWithValue()
{
if (!!attributeName) {
nsString* value = longStrBufToString();
attributes->addAttribute(attributeName, value);
nsString* val = longStrBufToString();
attributes->addAttribute(attributeName, val);
attributeName = nsnull;
}
}