Port bug 1490601 to comm-central: s/IsUTF8/IsUtf8/. rs=bustage-fix
authorJorg K <jorgk@jorgk.com>
Thu, 19 Sep 2019 00:59:16 +0200
changeset 78992 dd918656e4d7e4c79ebf44d9cb4e31eec406c1de
parent 78991 e569c75379ef9c533987f69001b14455979ffd96
child 78993 ba86d4035e32604591509bef799f0172881d53c4
child 78997 1dea742ee4ccd672aa400c6148c6b32334bfcc41
child 79958 ca810fa01b26f7bcf289bf875cf6e5eeb4742fd9
push id9333
push usermkmelin@iki.fi
push dateThu, 19 Sep 2019 05:20:01 +0000
treeherdertry-comm-central@406e11b425eb [default view] [failures only]
reviewersbustage-fix
bugs1490601
Port bug 1490601 to comm-central: s/IsUTF8/IsUtf8/. rs=bustage-fix
ldap/xpcom/src/nsLDAPMessage.cpp
mailnews/base/util/nsMsgUtils.h
mailnews/mime/src/comi18n.cpp
--- a/ldap/xpcom/src/nsLDAPMessage.cpp
+++ b/ldap/xpcom/src/nsLDAPMessage.cpp
@@ -337,17 +337,17 @@ nsLDAPMessage::GetValues(const char *aAt
   // clone the array (except for the trailing NULL entry) using the
   // shared allocator for XPCOM correctness
   //
   uint32_t numVals = ldap_count_values(values);
   aValues.SetCapacity(numVals);
   uint32_t i;
   for (i = 0; i < numVals; i++) {
     nsDependentCString sValue(values[i]);
-    if (IsUTF8(sValue))
+    if (mozilla::IsUtf8(sValue))
       aValues.AppendElement(NS_ConvertUTF8toUTF16(sValue));
     else
       aValues.AppendElement(NS_ConvertASCIItoUTF16(sValue));
   }
   ldap_value_free(values);
 
   return NS_OK;
 }
--- a/mailnews/base/util/nsMsgUtils.h
+++ b/mailnews/base/util/nsMsgUtils.h
@@ -347,17 +347,17 @@ NS_MSG_BASE nsresult ConvertBufToPlainTe
  * The following methods are not exposed to the external API, but when we're
  * using the internal API we can simply redirect the calls appropriately.
  */
 #define MsgLowerCaseEqualsLiteral(str, l) (str).LowerCaseEqualsLiteral(l)
 #define MsgRFindChar(str, ch, len) (str).RFindChar(ch, len)
 #define MsgCompressWhitespace(str) (str).CompressWhitespace()
 #define MsgReplaceSubstring(str, what, replacement) \
   (str).ReplaceSubstring(what, replacement)
-#define MsgIsUTF8(str) IsUTF8(str)
+#define MsgIsUTF8(str) mozilla::IsUtf8(str)
 #define MsgNewInterfaceRequestorAggregation(aFirst, aSecond, aResult) \
   NS_NewInterfaceRequestorAggregation(aFirst, aSecond, aResult)
 #define MsgNewNotificationCallbacksAggregation(aCallbacks, aLoadGroup, \
                                                aResult)                \
   NS_NewNotificationCallbacksAggregation(aCallbacks, aLoadGroup, aResult)
 #define MsgReplaceChar(aString, aNeedle, aReplacement) \
   (aString).ReplaceChar(aNeedle, aReplacement)
 #define MsgFind(str, what, ignore_case, offset) \
--- a/mailnews/mime/src/comi18n.cpp
+++ b/mailnews/mime/src/comi18n.cpp
@@ -103,17 +103,17 @@ nsresult MIME_detect_charset(const char 
     if (encoding) {
       encoding->Name(aCharset);
       // If ISO-2022-JP return, since being a 7bit charset, it would be
       // detected as UTF-8.
       if (aCharset.EqualsLiteral("ISO-2022-JP")) return NS_OK;
     }
   }
 
-  if (IsUTF8(mozilla::MakeSpan(aBuf, aLength))) {
+  if (mozilla::IsUtf8(mozilla::MakeSpan(aBuf, aLength))) {
     aCharset.AssignLiteral("UTF-8");
     return NS_OK;
   }
 
   // No UTF-8 detected, use previous detection result, if any.
   if (!aCharset.IsEmpty()) return NS_OK;
 
   return NS_ERROR_UNEXPECTED;