Bug 1213123 - Make Preferences::SetString accept char16ptr_t instead of char16_t*. r=froydnj
authorXidorn Quan <quanxunzhen@gmail.com>
Sat, 10 Oct 2015 12:19:23 +1100
changeset 300575 68d87fe56792fe3437ead0a5f3a0adcc9cd5f9b7
parent 300574 568b31997cc254f762bf71f617d71e0343877846
child 300576 57f5d00fc36b39e06d663f18218a4af732d94683
push id5392
push userraliiev@mozilla.com
push dateMon, 14 Dec 2015 20:08:23 +0000
treeherdermozilla-beta@16ce8562a975 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1213123
milestone44.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 1213123 - Make Preferences::SetString accept char16ptr_t instead of char16_t*. r=froydnj
modules/libpref/Preferences.cpp
modules/libpref/Preferences.h
--- a/modules/libpref/Preferences.cpp
+++ b/modules/libpref/Preferences.cpp
@@ -1509,17 +1509,17 @@ Preferences::SetCString(const char* aPre
 {
   ENSURE_MAIN_PROCESS("Cannot SetCString from content process:", aPref);
   NS_ENSURE_TRUE(InitStaticMembers(), NS_ERROR_NOT_AVAILABLE);
   return PREF_SetCharPref(aPref, PromiseFlatCString(aValue).get(), false);
 }
 
 // static
 nsresult
-Preferences::SetString(const char* aPref, const char16_t* aValue)
+Preferences::SetString(const char* aPref, const char16ptr_t aValue)
 {
   ENSURE_MAIN_PROCESS("Cannot SetString from content process:", aPref);
   NS_ENSURE_TRUE(InitStaticMembers(), NS_ERROR_NOT_AVAILABLE);
   return PREF_SetCharPref(aPref, NS_ConvertUTF16toUTF8(aValue).get(), false);
 }
 
 // static
 nsresult
--- a/modules/libpref/Preferences.h
+++ b/modules/libpref/Preferences.h
@@ -197,17 +197,17 @@ public:
   static nsresult SetInt(const char* aPref, int32_t aValue);
   static nsresult SetUint(const char* aPref, uint32_t aValue)
   {
     return SetInt(aPref, static_cast<int32_t>(aValue));
   }
   static nsresult SetFloat(const char* aPref, float aValue);
   static nsresult SetCString(const char* aPref, const char* aValue);
   static nsresult SetCString(const char* aPref, const nsACString &aValue);
-  static nsresult SetString(const char* aPref, const char16_t* aValue);
+  static nsresult SetString(const char* aPref, const char16ptr_t aValue);
   static nsresult SetString(const char* aPref, const nsAString &aValue);
 
   static nsresult SetComplex(const char* aPref, const nsIID &aType,
                              nsISupports* aValue);
 
   /**
    * Clears user set pref.
    */