Only allocate and copy a string in CAttributeToken::GetStringValue if the string spans multiple buffers. Otherwise, just wrap it with a nsDependentSubstring. Bug 268932, r=bzbarsky, sr=darin.
git-svn-id: svn://10.0.0.236/trunk@165246 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -646,7 +646,7 @@ nsresult nsHTMLTokenizer::ConsumeAttributes(PRUnichar aChar,
|
||||
//start token it was empty.
|
||||
if(NS_SUCCEEDED(result)) {
|
||||
PRBool isUsableAttr = PR_TRUE;
|
||||
const nsAString& key=theToken->GetKey();
|
||||
const nsSubstring& key=theToken->GetKey();
|
||||
const nsAString& text=theToken->GetValue();
|
||||
|
||||
// support XML like syntax to fix bugs like 44186
|
||||
|
||||
Reference in New Issue
Block a user