Bug 1179451 - Part 3: Use .get() to assign nsRefPtrs to raw pointers. r=froydnj
authorAryeh Gregor <ayg@aryeh.name>
Thu, 13 Aug 2015 15:22:48 +0300
changeset 257825 3eeaaee7238783ff488e2e74de89127be06eb1e0
parent 257824 1b6f0c5df0e4689df9557037ad70753785151e93
child 257826 aef5d038f5734d5eded84ba9d77982df6963988f
push id63729
push userryanvm@gmail.com
push dateFri, 14 Aug 2015 13:42:22 +0000
treeherdermozilla-inbound@6f05420e460d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1179451
milestone43.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 1179451 - Part 3: Use .get() to assign nsRefPtrs to raw pointers. r=froydnj
dom/plugins/ipc/PluginScriptableObjectChild.cpp
toolkit/profile/nsToolkitProfileService.cpp
--- a/dom/plugins/ipc/PluginScriptableObjectChild.cpp
+++ b/dom/plugins/ipc/PluginScriptableObjectChild.cpp
@@ -36,17 +36,17 @@ using namespace mozilla::plugins;
  * reason to retain identifiers there.
  */
 
 PluginScriptableObjectChild::IdentifierTable PluginScriptableObjectChild::sIdentifiers;
 
 /* static */ PluginScriptableObjectChild::StoredIdentifier*
 PluginScriptableObjectChild::HashIdentifier(const nsCString& aIdentifier)
 {
-  StoredIdentifier* stored = sIdentifiers.Get(aIdentifier);
+  StoredIdentifier* stored = sIdentifiers.Get(aIdentifier).get();
   if (stored) {
     return stored;
   }
 
   stored = new StoredIdentifier(aIdentifier);
   sIdentifiers.Put(aIdentifier, stored);
   return stored;
 }
--- a/toolkit/profile/nsToolkitProfileService.cpp
+++ b/toolkit/profile/nsToolkitProfileService.cpp
@@ -890,17 +890,17 @@ nsToolkitProfileService::CreateProfileIn
     }
 
     // We created a new profile dir. Let's store a creation timestamp.
     // Note that this code path does not apply if the profile dir was
     // created prior to launching.
     rv = CreateTimesInternal(rootDir);
     NS_ENSURE_SUCCESS(rv, rv);
 
-    nsToolkitProfile* last = aForExternalApp ? nullptr : mFirst;
+    nsToolkitProfile* last = aForExternalApp ? nullptr : mFirst.get();
     if (last) {
         while (last->mNext)
             last = last->mNext;
     }
 
     nsCOMPtr<nsIToolkitProfile> profile =
         new nsToolkitProfile(aName, rootDir, localDir, last, aForExternalApp);
     if (!profile) return NS_ERROR_OUT_OF_MEMORY;