diff --git a/mozilla/string/obsolete/nsString.h b/mozilla/string/obsolete/nsString.h index 9a616fbe741..61169ff2833 100644 --- a/mozilla/string/obsolete/nsString.h +++ b/mozilla/string/obsolete/nsString.h @@ -42,6 +42,11 @@ #define NEW_STRING_APIS 1 #endif //NEW_STRING_APIS + // Need this to enable comparison profiling for a while +#ifdef OLD_STRING_APIS + #undef NEW_STRING_APIS +#endif + #ifndef _nsCString_ #define _nsCString_ @@ -796,6 +801,15 @@ private: void InsertWithConversion( char, PRUint32 ); }; +#ifdef NEW_STRING_APIS +inline +nsPromiseConcatenation +operator+( const nsPromiseConcatenation& lhs, const nsCString& rhs ) + { + return nsPromiseConcatenation(lhs, rhs); + } +#endif + #ifdef NEW_STRING_APIS NS_DEF_STRING_COMPARISON_OPERATORS(nsCString, char) NS_DEF_DERIVED_STRING_OPERATOR_PLUS(nsCString, char); diff --git a/mozilla/xpcom/ds/nsString.h b/mozilla/xpcom/ds/nsString.h index 9a616fbe741..61169ff2833 100644 --- a/mozilla/xpcom/ds/nsString.h +++ b/mozilla/xpcom/ds/nsString.h @@ -42,6 +42,11 @@ #define NEW_STRING_APIS 1 #endif //NEW_STRING_APIS + // Need this to enable comparison profiling for a while +#ifdef OLD_STRING_APIS + #undef NEW_STRING_APIS +#endif + #ifndef _nsCString_ #define _nsCString_ @@ -796,6 +801,15 @@ private: void InsertWithConversion( char, PRUint32 ); }; +#ifdef NEW_STRING_APIS +inline +nsPromiseConcatenation +operator+( const nsPromiseConcatenation& lhs, const nsCString& rhs ) + { + return nsPromiseConcatenation(lhs, rhs); + } +#endif + #ifdef NEW_STRING_APIS NS_DEF_STRING_COMPARISON_OPERATORS(nsCString, char) NS_DEF_DERIVED_STRING_OPERATOR_PLUS(nsCString, char); diff --git a/mozilla/xpcom/string/obsolete/nsString.h b/mozilla/xpcom/string/obsolete/nsString.h index 9a616fbe741..61169ff2833 100644 --- a/mozilla/xpcom/string/obsolete/nsString.h +++ b/mozilla/xpcom/string/obsolete/nsString.h @@ -42,6 +42,11 @@ #define NEW_STRING_APIS 1 #endif //NEW_STRING_APIS + // Need this to enable comparison profiling for a while +#ifdef OLD_STRING_APIS + #undef NEW_STRING_APIS +#endif + #ifndef _nsCString_ #define _nsCString_ @@ -796,6 +801,15 @@ private: void InsertWithConversion( char, PRUint32 ); }; +#ifdef NEW_STRING_APIS +inline +nsPromiseConcatenation +operator+( const nsPromiseConcatenation& lhs, const nsCString& rhs ) + { + return nsPromiseConcatenation(lhs, rhs); + } +#endif + #ifdef NEW_STRING_APIS NS_DEF_STRING_COMPARISON_OPERATORS(nsCString, char) NS_DEF_DERIVED_STRING_OPERATOR_PLUS(nsCString, char);