Backout the nsUTF8Utils.h part of changeset 531b7f4293e9 (bug 800106) because of Kraken regressions on Windows XP
authorEhsan Akhgari <ehsan@mozilla.com>
Tue, 23 Oct 2012 21:10:34 -0400
changeset 111342 7f88c599f95a5590d15a2ddbd0be8d179c37f999
parent 111341 f2acc4fa85903e4a70c02047c705ecbb5ef8fc2e
child 111343 2583a19e59ef92cc1e5e5cdd9601c29504d9448c
push id93
push usernmatsakis@mozilla.com
push dateWed, 31 Oct 2012 21:26:57 +0000
bugs800106
milestone19.0a1
Backout the nsUTF8Utils.h part of changeset 531b7f4293e9 (bug 800106) because of Kraken regressions on Windows XP
xpcom/string/public/nsUTF8Utils.h
--- a/xpcom/string/public/nsUTF8Utils.h
+++ b/xpcom/string/public/nsUTF8Utils.h
@@ -281,17 +281,17 @@ class ConvertUTF8toUTF16
 
     ConvertUTF8toUTF16( buffer_type* aBuffer )
         : mStart(aBuffer), mBuffer(aBuffer), mErrorEncountered(false) {}
 
     size_t Length() const { return mBuffer - mStart; }
 
     bool ErrorEncountered() const { return mErrorEncountered; }
 
-    void MOZ_ALWAYS_INLINE write( const value_type* start, uint32_t N )
+    void NS_ALWAYS_INLINE write( const value_type* start, uint32_t N )
       {
         if ( mErrorEncountered )
           return;
 
         // algorithm assumes utf8 units won't
         // be spread across fragments
         const value_type* p = start;
         const value_type* end = start + N;
@@ -340,17 +340,17 @@ class CalculateUTF8Length
   {
     public:
       typedef char value_type;
 
     CalculateUTF8Length() : mLength(0), mErrorEncountered(false) { }
 
     size_t Length() const { return mLength; }
 
-    void MOZ_ALWAYS_INLINE write( const value_type* start, uint32_t N )
+    void NS_ALWAYS_INLINE write( const value_type* start, uint32_t N )
       {
           // ignore any further requests
         if ( mErrorEncountered )
             return;
 
         // algorithm assumes utf8 units won't
         // be spread across fragments
         const value_type* p = start;
@@ -444,17 +444,17 @@ class ConvertUTF16toUTF8
     // |ConvertUTF8toUTF16|, but it's that way for backwards
     // compatibility.
 
     ConvertUTF16toUTF8( buffer_type* aBuffer )
         : mStart(aBuffer), mBuffer(aBuffer) {}
 
     size_t Size() const { return mBuffer - mStart; }
 
-    void MOZ_ALWAYS_INLINE write( const value_type* start, uint32_t N )
+    void NS_ALWAYS_INLINE write( const value_type* start, uint32_t N )
       {
         buffer_type *out = mBuffer; // gcc isn't smart enough to do this!
 
         for (const value_type *p = start, *end = start + N; p < end; ++p )
           {
             value_type c = *p;
             if (! (c & 0xFF80)) // U+0000 - U+007F
               {
@@ -561,17 +561,17 @@ class CalculateUTF8Size
     public:
       typedef PRUnichar value_type;
 
     CalculateUTF8Size()
       : mSize(0) { }
 
     size_t Size() const { return mSize; }
 
-    void MOZ_ALWAYS_INLINE write( const value_type* start, uint32_t N )
+    void NS_ALWAYS_INLINE write( const value_type* start, uint32_t N )
       {
         // Assume UCS2 surrogate pairs won't be spread across fragments.
         for (const value_type *p = start, *end = start + N; p < end; ++p )
           {
             value_type c = *p;
             if (! (c & 0xFF80)) // U+0000 - U+007F
               mSize += 1;
             else if (! (c & 0xF800)) // U+0100 - U+07FF