mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-01 14:45:29 +00:00
Bug 797982 - investigation patch for StringBuilder::Unit crash, r=hsivonen
This commit is contained in:
parent
ee9067e40d
commit
d8f6c4ce3e
@ -647,12 +647,16 @@ private:
|
||||
class Unit
|
||||
{
|
||||
public:
|
||||
Unit() : mType(eUnknown), mLength(0) {}
|
||||
Unit() : mAtom(nullptr), mType(eUnknown), mLength(0)
|
||||
{
|
||||
MOZ_COUNT_CTOR(StringBuilder::Unit);
|
||||
}
|
||||
~Unit()
|
||||
{
|
||||
if (mType == eString || mType == eStringWithEncode) {
|
||||
delete mString;
|
||||
}
|
||||
MOZ_COUNT_DTOR(StringBuilder::Unit);
|
||||
}
|
||||
|
||||
enum Type
|
||||
@ -677,7 +681,15 @@ private:
|
||||
uint32_t mLength;
|
||||
};
|
||||
public:
|
||||
StringBuilder() : mLast(this), mLength(0) {}
|
||||
StringBuilder() : mLast(this), mLength(0)
|
||||
{
|
||||
MOZ_COUNT_CTOR(StringBuilder);
|
||||
}
|
||||
|
||||
~StringBuilder()
|
||||
{
|
||||
MOZ_COUNT_DTOR(StringBuilder);
|
||||
}
|
||||
|
||||
void Append(nsIAtom* aAtom)
|
||||
{
|
||||
@ -807,6 +819,7 @@ private:
|
||||
StringBuilder(StringBuilder* aFirst)
|
||||
: mLast(nullptr), mLength(0)
|
||||
{
|
||||
MOZ_COUNT_CTOR(StringBuilder);
|
||||
aFirst->mLast->mNext = this;
|
||||
aFirst->mLast = this;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user