diff --git a/mozilla/xpcom/string/public/nsTAString.h b/mozilla/xpcom/string/public/nsTAString.h index b7c9130c43a..6da898e97a0 100644 --- a/mozilla/xpcom/string/public/nsTAString.h +++ b/mozilla/xpcom/string/public/nsTAString.h @@ -515,6 +515,7 @@ class nsTAString_CharT , mLength(0) , mFlags(0) { + NS_ASSERTION(mVTable, "mVTable is null! Is this a static string instance?!"); Assign(tuple); } @@ -551,7 +552,9 @@ class nsTAString_CharT , mData(data) , mLength(length) , mFlags(flags) - {} + { + NS_ASSERTION(mVTable, "mVTable is null! Is this a static string instance?!"); + } /** * optional ctor for use by subclasses. @@ -562,7 +565,9 @@ class nsTAString_CharT nsTAString_CharT(PRUint32 flags) : mVTable(obsolete_string_type::sCanonicalVTable) , mFlags(flags) - {} + { + NS_ASSERTION(mVTable, "mVTable is null! Is this a static string instance?!"); + } /** * get pointer to internal string buffer (may not be null terminated). diff --git a/mozilla/xpcom/string/src/nsTAString.cpp b/mozilla/xpcom/string/src/nsTAString.cpp index cd48e0e3238..9bb826b8cb0 100644 --- a/mozilla/xpcom/string/src/nsTAString.cpp +++ b/mozilla/xpcom/string/src/nsTAString.cpp @@ -53,6 +53,7 @@ nsTAString_CharT::~nsTAString_CharT() { + NS_ASSERTION(mVTable, "mVTable is null! Is this a static string instance?!"); if (mVTable == obsolete_string_type::sCanonicalVTable) AsSubstring()->Finalize(); else