Bug 1390036 (part 3) - Remove nsXPIDLString. r=erahm.
authorNicholas Nethercote <nnethercote@mozilla.com>
Mon, 14 Aug 2017 15:25:04 +1000
changeset 374958 30b4593d421308ef2ba9d608732cfcf707c77b55
parent 374957 5e6de75921f1a41b02fbd2358edf3b23457105c9
child 374960 159c8ad709626bdbe954524ffd2a74b18c045f50
push id93801
push usernnethercote@mozilla.com
push dateWed, 16 Aug 2017 06:10:24 +0000
treeherdermozilla-inbound@30b4593d4213 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerserahm
bugs1390036
milestone57.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 1390036 (part 3) - Remove nsXPIDLString. r=erahm.
xpcom/string/nsStringFwd.h
xpcom/string/nsTString.h
xpcom/string/string-template-def-unichar.h
xpcom/tests/gtest/TestXPIDLString.cpp
xpcom/tests/gtest/moz.build
--- a/xpcom/string/nsStringFwd.h
+++ b/xpcom/string/nsStringFwd.h
@@ -29,23 +29,22 @@ class nsAString;
 class nsSubstringTuple;
 class nsString;
 class nsAutoString;
 class nsDependentString;
 class nsDependentSubstring;
 class nsPromiseFlatString;
 class nsStringComparator;
 class nsDefaultStringComparator;
-class nsXPIDLString;
 
 // Single-byte (char) string types.
 class nsACString;
 class nsCSubstringTuple;
 class nsCString;
 class nsAutoCString;
 class nsDependentCString;
 class nsDependentCSubstring;
 class nsPromiseFlatCString;
 class nsCStringComparator;
 class nsDefaultCStringComparator;
-class nsXPIDLCString;
+class nsXPIDLCString; // deprecated
 
 #endif /* !defined(nsStringFwd_h___) */
--- a/xpcom/string/nsTString.h
+++ b/xpcom/string/nsTString.h
@@ -701,18 +701,18 @@ public:
  * nsTXPIDLString extends nsTString such that:
  *
  *   (1) mData can be null
  *   (2) objects of this type can be automatically cast to |const CharT*|
  *   (3) getter_Copies method is supported to adopt data allocated with
  *       moz_xmalloc, such as "out string" parameters in XPIDL.
  *
  * NAMES:
- *   nsXPIDLString for wide characters
- *   nsXPIDLCString for narrow characters
+ *   nsXPIDLString for wide characters (no longer available)
+ *   nsXPIDLCString for narrow characters (deprecated)
  */
 class nsTXPIDLString_CharT : public nsTString_CharT
 {
 public:
 
   typedef nsTXPIDLString_CharT self_type;
 
 public:
--- a/xpcom/string/string-template-def-unichar.h
+++ b/xpcom/string/string-template-def-unichar.h
@@ -15,14 +15,13 @@
 #define nsTSubstring_CharT                  nsAString
 #define PrintfAppend_CharT                  PrintfAppend_nsAString
 #define nsTSubstringTuple_CharT             nsSubstringTuple
 #define nsTStringComparator_CharT           nsStringComparator
 #define nsTDefaultStringComparator_CharT    nsDefaultStringComparator
 #define nsTDependentString_CharT            nsDependentString
 #define nsTDependentSubstring_CharT         nsDependentSubstring
 #define nsTLiteralString_CharT              nsLiteralString
-#define nsTXPIDLString_CharT                nsXPIDLString
 #define nsTGetterCopies_CharT               nsGetterCopies
 #define nsTPromiseFlatString_CharT          nsPromiseFlatString
 #define TPromiseFlatString_CharT            PromiseFlatString
 #define nsTSubstringSplitter_CharT          nsSubstringSplitter
 #define TNullString_CharT                   NullString
deleted file mode 100644
--- a/xpcom/tests/gtest/TestXPIDLString.cpp
+++ /dev/null
@@ -1,24 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=8 sts=2 et sw=2 tw=80: */
-/* 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 "nsString.h"
-#include "nsReadableUtils.h"
-#include "nsXPIDLString.h"
-#include "gtest/gtest.h"
-
-static void
-nsXPIDLStringTest_Value(char16_t** aResult)
-{
-  *aResult = ToNewUnicode(NS_LITERAL_STRING("Hello, World"));
-}
-
-TEST(XPIDLString, Main)
-{
-  nsXPIDLString s1;
-  nsXPIDLStringTest_Value(getter_Copies(s1));
-  EXPECT_TRUE(s1.EqualsLiteral("Hello, World"));
-}
-
--- a/xpcom/tests/gtest/moz.build
+++ b/xpcom/tests/gtest/moz.build
@@ -50,17 +50,16 @@ UNIFIED_SOURCES += [
     'TestThreadPool.cpp',
     'TestThreadPoolListener.cpp',
     'TestThreads.cpp',
     'TestThreadUtils.cpp',
     'TestTimers.cpp',
     'TestTimeStamp.cpp',
     'TestTokenizer.cpp',
     'TestUTF.cpp',
-    'TestXPIDLString.cpp',
 ]
 
 if CONFIG['MOZ_DEBUG'] and CONFIG['OS_ARCH'] not in ('WINNT') and CONFIG['OS_TARGET'] != 'Android':
     # FIXME bug 523392: TestDeadlockDetector doesn't like Windows
     # Bug 1054249: Doesn't work on Android
     UNIFIED_SOURCES += [
         'TestDeadlockDetector.cpp',
         'TestDeadlockDetectorScalability.cpp',