Move voidable string into xpcom. Part of fix for bug 221387 (XPathExpression.createExpression doesn't throw NAMESPACE_ERR). r=bz, sr=dbaron.
git-svn-id: svn://10.0.0.236/trunk@147799 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -1330,6 +1330,24 @@ nsAutoString::nsAutoString(const CBufDescriptor& aBuffer) : nsString() {
|
||||
AddNullTerminator(*this);
|
||||
}
|
||||
|
||||
PRUnichar* nsVoidableString::GetWritableFragment(nsWritableFragment<PRUnichar>& aFragment,nsFragmentRequest aRequest,PRUint32 aOffset) {
|
||||
mIsVoid = PR_FALSE;
|
||||
|
||||
return nsAutoString::GetWritableFragment(aFragment, aRequest, aOffset);
|
||||
}
|
||||
|
||||
PRBool nsVoidableString::IsVoid() const {
|
||||
return mIsVoid;
|
||||
}
|
||||
|
||||
void nsVoidableString::SetIsVoid(PRBool aVoid) {
|
||||
if (aVoid && !mIsVoid) {
|
||||
Truncate();
|
||||
}
|
||||
|
||||
mIsVoid = aVoid;
|
||||
}
|
||||
|
||||
void
|
||||
NS_ConvertASCIItoUTF16::Init( const char* aCString, PRUint32 aLength )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user