Bug 442714 - Mark NS_STACK_CLASS on nsAutoString, r=dbaron

This commit is contained in:
Benjamin Smedberg 2008-06-30 14:46:47 -04:00
parent 2f2e63b633
commit a124d5b9a1
5 changed files with 6 additions and 9 deletions

View File

@ -54,9 +54,7 @@ public:
virtual ~nsScriptableUnicodeConverter();
protected:
// charsets are ALWAYS very short, so its actually better to use
// nsCAutoString here
nsCAutoString mCharset;
nsCString mCharset;
nsCOMPtr<nsIUnicodeEncoder> mEncoder;
nsCOMPtr<nsIUnicodeDecoder> mDecoder;

View File

@ -121,6 +121,5 @@ public:
private:
nsCOMPtr<nsILocalFile> mFile;
nsCAutoString mRelativeToKey; // An nsCAutoString because length is always very short.
// While this makes the object larger, avoids allocation.
nsCString mRelativeToKey;
};

View File

@ -48,7 +48,7 @@
class nsDirectoryIndexStream : public nsIInputStream
{
private:
nsCAutoString mBuf;
nsCString mBuf;
PRInt32 mOffset;
nsresult mStatus;

View File

@ -77,7 +77,7 @@ private:
char* DigestBufferLines(char *aBuffer, nsCString &aString);
// member data
nsCAutoString mBuffer; // buffered data.
nsCString mBuffer; // buffered data.
PRBool mSentHeading; // have we sent 100, 101, 200, and 300 lines yet?
nsIStreamListener *mFinalListener; // this guy gets the converted data via his OnDataAvailable()

View File

@ -487,7 +487,7 @@ class nsTFixedString_CharT : public nsTString_CharT
* Subclass of nsTString_CharT that adds support for stack-based string
* allocation. Do not allocate this class on the heap! ;-)
*/
class nsTAutoString_CharT : public nsTFixedString_CharT
class NS_STACK_CLASS nsTAutoString_CharT : public nsTFixedString_CharT
{
public:
@ -631,7 +631,7 @@ class nsTXPIDLString_CharT : public nsTString_CharT
* // ...
* }
*/
class nsTGetterCopies_CharT
class NS_STACK_CLASS nsTGetterCopies_CharT
{
public:
typedef CharT char_type;