Bug 1368418 part 2 - Remove nsCaseConversionImp2. r=emk
authorXidorn Quan <me@upsuper.org>
Mon, 29 May 2017 16:10:36 +1000
changeset 409292 bb587e11b75f879010b092987aa2de2b8ccfcbcb
parent 409291 c14a7823ce37ca55fc78e0d7e970e8ee764fcd80
child 409293 2f09a955dbd63dabfe4ae4d256078252492855e3
push id7391
push usermtabara@mozilla.com
push dateMon, 12 Jun 2017 13:08:53 +0000
treeherdermozilla-beta@2191d7f87e2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersemk
bugs1368418
milestone55.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1368418 part 2 - Remove nsCaseConversionImp2. r=emk Code search indicates that it is used neither internally nor in any addon. It should be safe to remove. MozReview-Commit-ID: K3dBoydIwGk
intl/build/nsI18nModule.cpp
intl/unicharutil/moz.build
intl/unicharutil/nsCaseConversionImp2.cpp
intl/unicharutil/nsCaseConversionImp2.h
intl/unicharutil/nsICaseConversion.h
intl/unicharutil/nsUnicharUtilCIID.h
--- a/intl/build/nsI18nModule.cpp
+++ b/intl/build/nsI18nModule.cpp
@@ -8,17 +8,16 @@
 // lwbrk
 #include "nsLWBrkCIID.h"
 #include "nsJISx4051LineBreaker.h"
 #include "nsSampleWordBreaker.h"
 
 // unicharutil
 #include "nsCategoryImp.h"
 #include "nsUnicharUtilCIID.h"
-#include "nsCaseConversionImp2.h"
 #include "nsEntityConverter.h"
 #include "nsSaveAsCharset.h"
 #include "nsUnicodeNormalizer.h"
 
 // string bundles (intl)
 #include "nsStringBundleService.h"
 #include "nsStringBundleTextOverride.h"
 
@@ -28,28 +27,26 @@
 // uconv
 
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsJISx4051LineBreaker)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsSampleWordBreaker)
 
 NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsStringBundleService, Init)
 NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsStringBundleTextOverride, Init)
 
-NS_GENERIC_FACTORY_CONSTRUCTOR(nsCaseConversionImp2)
 NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsCategoryImp,
                                          nsCategoryImp::GetInstance)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsEntityConverter)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsSaveAsCharset)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeNormalizer)
 
 NS_DEFINE_NAMED_CID(MOZ_LOCALESERVICE_CID);
 NS_DEFINE_NAMED_CID(MOZ_OSPREFERENCES_CID);
 NS_DEFINE_NAMED_CID(NS_LBRK_CID);
 NS_DEFINE_NAMED_CID(NS_WBRK_CID);
-NS_DEFINE_NAMED_CID(NS_UNICHARUTIL_CID);
 NS_DEFINE_NAMED_CID(NS_UNICHARCATEGORY_CID);
 NS_DEFINE_NAMED_CID(NS_ENTITYCONVERTER_CID);
 NS_DEFINE_NAMED_CID(NS_SAVEASCHARSET_CID);
 NS_DEFINE_NAMED_CID(NS_UNICODE_NORMALIZER_CID);
 NS_DEFINE_NAMED_CID(NS_STRINGBUNDLESERVICE_CID);
 NS_DEFINE_NAMED_CID(NS_STRINGBUNDLETEXTOVERRIDE_CID);
 NS_DEFINE_NAMED_CID(NS_LOCALESERVICE_CID);
 NS_DEFINE_NAMED_CID(NS_COLLATIONFACTORY_CID);
@@ -57,17 +54,16 @@ NS_DEFINE_NAMED_CID(NS_SCRIPTABLEDATEFOR
 NS_DEFINE_NAMED_CID(NS_PLATFORMCHARSET_CID);
 NS_DEFINE_NAMED_CID(NS_COLLATION_CID);
 
 static const mozilla::Module::CIDEntry kIntlCIDs[] = {
     { &kMOZ_LOCALESERVICE_CID, false, nullptr, mozilla::intl::LocaleServiceConstructor },
     { &kMOZ_OSPREFERENCES_CID, false, nullptr, mozilla::intl::OSPreferencesConstructor },
     { &kNS_LBRK_CID, false, nullptr, nsJISx4051LineBreakerConstructor },
     { &kNS_WBRK_CID, false, nullptr, nsSampleWordBreakerConstructor },
-    { &kNS_UNICHARUTIL_CID, false, nullptr, nsCaseConversionImp2Constructor },
     { &kNS_UNICHARCATEGORY_CID, false, nullptr, nsCategoryImpConstructor },
     { &kNS_ENTITYCONVERTER_CID, false, nullptr, nsEntityConverterConstructor },
     { &kNS_SAVEASCHARSET_CID, false, nullptr, nsSaveAsCharsetConstructor },
     { &kNS_UNICODE_NORMALIZER_CID, false, nullptr, nsUnicodeNormalizerConstructor },
     { &kNS_STRINGBUNDLESERVICE_CID, false, nullptr, nsStringBundleServiceConstructor },
     { &kNS_STRINGBUNDLETEXTOVERRIDE_CID, false, nullptr, nsStringBundleTextOverrideConstructor },
     { &kNS_LOCALESERVICE_CID, false, nullptr, CreateLocaleService },
     { &kNS_COLLATIONFACTORY_CID, false, nullptr, nsCollationFactoryConstructor },
@@ -77,17 +73,16 @@ static const mozilla::Module::CIDEntry k
     { nullptr }
 };
 
 static const mozilla::Module::ContractIDEntry kIntlContracts[] = {
     { MOZ_LOCALESERVICE_CONTRACTID, &kMOZ_LOCALESERVICE_CID },
     { MOZ_OSPREFERENCES_CONTRACTID, &kMOZ_OSPREFERENCES_CID },
     { NS_LBRK_CONTRACTID, &kNS_LBRK_CID },
     { NS_WBRK_CONTRACTID, &kNS_WBRK_CID },
-    { NS_UNICHARUTIL_CONTRACTID, &kNS_UNICHARUTIL_CID },
     { NS_UNICHARCATEGORY_CONTRACTID, &kNS_UNICHARCATEGORY_CID },
     { NS_ENTITYCONVERTER_CONTRACTID, &kNS_ENTITYCONVERTER_CID },
     { NS_SAVEASCHARSET_CONTRACTID, &kNS_SAVEASCHARSET_CID },
     { NS_UNICODE_NORMALIZER_CONTRACTID, &kNS_UNICODE_NORMALIZER_CID },
     { NS_STRINGBUNDLE_CONTRACTID, &kNS_STRINGBUNDLESERVICE_CID },
     { NS_STRINGBUNDLETEXTOVERRIDE_CONTRACTID, &kNS_STRINGBUNDLETEXTOVERRIDE_CID },
     { NS_LOCALESERVICE_CONTRACTID, &kNS_LOCALESERVICE_CID },
     { NS_COLLATIONFACTORY_CONTRACTID, &kNS_COLLATIONFACTORY_CID },
--- a/intl/unicharutil/moz.build
+++ b/intl/unicharutil/moz.build
@@ -11,24 +11,22 @@ XPIDL_SOURCES += [
     'nsIEntityConverter.idl',
     'nsISaveAsCharset.idl',
     'nsIUnicodeNormalizer.idl',
 ]
 
 XPIDL_MODULE = 'unicharutil'
 
 EXPORTS += [
-    'nsICaseConversion.h',
     'nsIUGenCategory.h',
     'nsUnicharUtilCIID.h',
     'nsUnicodeNormalizer.h',
 ]
 
 UNIFIED_SOURCES += [
-    'nsCaseConversionImp2.cpp',
     'nsCategoryImp.cpp',
     'nsEntityConverter.cpp',
     'nsSaveAsCharset.cpp',
 ]
 
 if CONFIG['ENABLE_INTL_API']:
     UNIFIED_SOURCES += [
         'nsUnicodeNormalizer_ICU.cpp',
deleted file mode 100644
--- a/intl/unicharutil/nsCaseConversionImp2.cpp
+++ /dev/null
@@ -1,62 +0,0 @@
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "nsCaseConversionImp2.h"
-#include "nsUnicharUtils.h"
-
-NS_IMETHODIMP_(MozExternalRefCountType) nsCaseConversionImp2::AddRef(void)
-{
-  return (MozExternalRefCountType)1;
-}
-
-NS_IMETHODIMP_(MozExternalRefCountType) nsCaseConversionImp2::Release(void)
-{
-  return (MozExternalRefCountType)1;
-}
-
-NS_IMPL_QUERY_INTERFACE(nsCaseConversionImp2, nsICaseConversion)
-
-NS_IMETHODIMP nsCaseConversionImp2::ToUpper(char16_t aChar, char16_t* aReturn)
-{
-  *aReturn = ToUpperCase(aChar);
-  return NS_OK;
-}
-
-NS_IMETHODIMP nsCaseConversionImp2::ToLower(char16_t aChar, char16_t* aReturn)
-{
-  *aReturn = ToLowerCase(aChar);
-  return NS_OK;
-}
-
-NS_IMETHODIMP nsCaseConversionImp2::ToTitle(char16_t aChar, char16_t* aReturn)
-{
-  *aReturn = ToTitleCase(aChar);
-  return NS_OK;
-}
-
-NS_IMETHODIMP nsCaseConversionImp2::ToUpper(const char16_t* anArray,
-                                         char16_t* aReturn,
-                                         uint32_t aLen)
-{
-  ToUpperCase(anArray, aReturn, aLen);
-  return NS_OK;
-}
-
-NS_IMETHODIMP nsCaseConversionImp2::ToLower(const char16_t* anArray,
-                                         char16_t* aReturn,
-                                         uint32_t aLen)
-{
-  ToLowerCase(anArray, aReturn, aLen);
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-nsCaseConversionImp2::CaseInsensitiveCompare(const char16_t *aLeft,
-                                             const char16_t *aRight,
-                                             uint32_t aCount, int32_t* aResult)
-{
-  *aResult = ::CaseInsensitiveCompare(aLeft, aRight, aCount);
-  return NS_OK;
-}
deleted file mode 100644
--- a/intl/unicharutil/nsCaseConversionImp2.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#ifndef nsCaseConversionImp2_h__
-#define nsCaseConversionImp2_h__
-
-#include "nscore.h"
-#include "nsISupports.h"
-
-#include "nsICaseConversion.h"
-
-class nsCaseConversionImp2 : public nsICaseConversion { 
-  NS_DECL_THREADSAFE_ISUPPORTS 
-
-public:
-  virtual ~nsCaseConversionImp2() { }
-
-  static nsCaseConversionImp2* GetInstance();
-
-  NS_IMETHOD ToUpper(char16_t aChar, char16_t* aReturn) override;
-
-  NS_IMETHOD ToLower(char16_t aChar, char16_t* aReturn) override;
-
-  NS_IMETHOD ToTitle(char16_t aChar, char16_t* aReturn) override;
-
-  NS_IMETHOD ToUpper(const char16_t* anArray, char16_t* aReturn, uint32_t aLen) override;
-
-  NS_IMETHOD ToLower(const char16_t* anArray, char16_t* aReturn, uint32_t aLen) override;
-
-  NS_IMETHOD CaseInsensitiveCompare(const char16_t* aLeft, const char16_t* aRight, uint32_t aLength, int32_t *aResult) override;
-};
-
-#endif
deleted file mode 100644
--- a/intl/unicharutil/nsICaseConversion.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-#ifndef nsICaseConversion_h__
-#define nsICaseConversion_h__
-
-
-#include "nsISupports.h"
-#include "nscore.h"
-
-// {07D3D8E0-9614-11d2-B3AD-00805F8A6670}
-#define NS_ICASECONVERSION_IID \
-{ 0x7d3d8e0, 0x9614, 0x11d2, \
-    { 0xb3, 0xad, 0x0, 0x80, 0x5f, 0x8a, 0x66, 0x70 } }
-
-class nsICaseConversion : public nsISupports {
-
-public: 
-
-  NS_DECLARE_STATIC_IID_ACCESSOR(NS_ICASECONVERSION_IID)
-
-  // Convert one Unicode character into upper case
-  NS_IMETHOD ToUpper( char16_t aChar, char16_t* aReturn) = 0;
-
-  // Convert one Unicode character into lower case
-  NS_IMETHOD ToLower( char16_t aChar, char16_t* aReturn) = 0;
-
-  // Convert one Unicode character into title case
-  NS_IMETHOD ToTitle( char16_t aChar, char16_t* aReturn) = 0;
-
-  // Convert an array of Unicode characters into upper case
-  NS_IMETHOD ToUpper( const char16_t* anArray, char16_t* aReturn, uint32_t aLen) = 0;
-
-  // Convert an array of Unicode characters into lower case
-  NS_IMETHOD ToLower( const char16_t* anArray, char16_t* aReturn, uint32_t aLen) = 0;
-
-  // case-insensitive char16_t* comparison - aResult returns similar
-  // to strcasecmp
-  NS_IMETHOD CaseInsensitiveCompare(const char16_t* aLeft, const char16_t* aRight, uint32_t aLength, int32_t* aResult) = 0;
-};
-
-NS_DEFINE_STATIC_IID_ACCESSOR(nsICaseConversion, NS_ICASECONVERSION_IID)
-
-#endif  /* nsICaseConversion_h__ */
--- a/intl/unicharutil/nsUnicharUtilCIID.h
+++ b/intl/unicharutil/nsUnicharUtilCIID.h
@@ -4,21 +4,15 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 #ifndef nsUnicharUtilCIID_h__
 #define nsUnicharUtilCIID_h__
 
 
 #include "nsISupports.h"
 #include "nscore.h"
 
-#define NS_UNICHARUTIL_CID \
-{ 0xcc10c750, 0x9ec3, 0x11d2, \
-  { 0xb3, 0xae, 0x0, 0x80, 0x5f, 0x8a, 0x66, 0x70 } }
-
-#define NS_UNICHARUTIL_CONTRACTID "@mozilla.org/intl/unicharutil;1"
-
 #define NS_UNICHARCATEGORY_CID \
 { 0x748a1132, 0x671a, 0x409a, \
   { 0x8d, 0x1d, 0xf1, 0xcd, 0xf6, 0xb3, 0xa6, 0xb4 } }
 
 #define NS_UNICHARCATEGORY_CONTRACTID "@mozilla.org/intl/unicharcategory;1"
 
 #endif