зеркало из https://github.com/mozilla/gecko-dev.git
Don't try to Truncate when we fail to find the character. Actually, just do an assignment with the character location as the count size. This is actually a checkin for scc. r=travis
This commit is contained in:
Родитель
50ebcd93ee
Коммит
cdd92be805
|
@ -351,10 +351,8 @@ nsresult CEndToken::Consume(PRUnichar aChar, nsScanner& aScanner,PRInt32 aMode)
|
|||
nsresult result=aScanner.ReadUntil(mTextValue,kGreaterThan,PR_FALSE);
|
||||
|
||||
if(NS_OK==result){
|
||||
|
||||
PRInt32 theIndex=mTextValue.FindCharInSet(" \r\n\t\b",0);
|
||||
nsAutoString buffer(mTextValue);
|
||||
buffer.Truncate(theIndex);
|
||||
nsAutoString buffer;
|
||||
buffer.Assign(mTextValue, mTextValue.FindCharInSet(" \r\n\t\b",0));
|
||||
mTypeID= nsHTMLTags::LookupTag(buffer);
|
||||
result=aScanner.GetChar(aChar); //eat the closing '>;
|
||||
}
|
||||
|
|
|
@ -351,10 +351,8 @@ nsresult CEndToken::Consume(PRUnichar aChar, nsScanner& aScanner,PRInt32 aMode)
|
|||
nsresult result=aScanner.ReadUntil(mTextValue,kGreaterThan,PR_FALSE);
|
||||
|
||||
if(NS_OK==result){
|
||||
|
||||
PRInt32 theIndex=mTextValue.FindCharInSet(" \r\n\t\b",0);
|
||||
nsAutoString buffer(mTextValue);
|
||||
buffer.Truncate(theIndex);
|
||||
nsAutoString buffer;
|
||||
buffer.Assign(mTextValue, mTextValue.FindCharInSet(" \r\n\t\b",0));
|
||||
mTypeID= nsHTMLTags::LookupTag(buffer);
|
||||
result=aScanner.GetChar(aChar); //eat the closing '>;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче