GetStateProperty now clears the outgoing arg before appending the new value.
b=61297, r=jst,a=hyatt git-svn-id: svn://10.0.0.236/trunk@82955 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -68,13 +68,12 @@ nsPresState::GetStateProperty(const nsAReadableString& aName,
|
||||
if (mPropertyTable)
|
||||
str = dont_AddRef(NS_STATIC_CAST(nsISupportsWString*, mPropertyTable->Get(&key)));
|
||||
|
||||
aResult.SetLength(0);
|
||||
if (str) {
|
||||
PRUnichar* data;
|
||||
PRUnichar* data = nsnull;
|
||||
str->GetData(&data);
|
||||
aResult.Append(data);
|
||||
nsMemory::Free(data);
|
||||
} else {
|
||||
aResult.SetLength(0);
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@@ -68,13 +68,12 @@ nsPresState::GetStateProperty(const nsAReadableString& aName,
|
||||
if (mPropertyTable)
|
||||
str = dont_AddRef(NS_STATIC_CAST(nsISupportsWString*, mPropertyTable->Get(&key)));
|
||||
|
||||
aResult.SetLength(0);
|
||||
if (str) {
|
||||
PRUnichar* data;
|
||||
PRUnichar* data = nsnull;
|
||||
str->GetData(&data);
|
||||
aResult.Append(data);
|
||||
nsMemory::Free(data);
|
||||
} else {
|
||||
aResult.SetLength(0);
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user