Bug 1213123 - Make Preferences::SetString accept char16ptr_t instead of char16_t*. r=froydnj a=lizzard
authorXidorn Quan <quanxunzhen@gmail.com>
Sat, 10 Oct 2015 12:19:23 +1100
changeset 296555 53010930bc01e32fd389c549686ab8a773e0b684
parent 296554 9bc9b8a09107bb1d32ab8743b9d16be03cde8827
child 296556 6ebb2c91a7024b16d423a0f32f4da6e75db05ff2
push id5245
push userraliiev@mozilla.com
push dateThu, 29 Oct 2015 11:30:51 +0000
treeherdermozilla-beta@dac831dc1bd0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj, lizzard
bugs1213123
milestone43.0a2
Bug 1213123 - Make Preferences::SetString accept char16ptr_t instead of char16_t*. r=froydnj a=lizzard
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.
    */