Bug 991812: B2G Fixups CLOSED TREE. r=me
authorKyle Huey <khuey@kylehuey.com>
Tue, 15 Apr 2014 15:26:43 -0700
changeset 197222 0c55cac422f2b9aadeecc005bfcd931e87f9e681
parent 197221 037edc1bb5013508c3812bda29cadb3829368edb
child 197223 3d7bfc590ccd7cfa01ce0ebb6c865a66e813bbd4
push id3624
push userasasaki@mozilla.com
push dateMon, 09 Jun 2014 21:49:01 +0000
treeherdermozilla-beta@b1a5da15899a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersme
bugs991812
milestone31.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 991812: B2G Fixups CLOSED TREE. r=me
dom/system/gonk/AutoMounter.cpp
dom/system/gonk/VolumeCommand.h
--- a/dom/system/gonk/AutoMounter.cpp
+++ b/dom/system/gonk/AutoMounter.cpp
@@ -163,29 +163,29 @@ private:
 
 /***************************************************************************/
 
 class AutoMounter
 {
 public:
   NS_INLINE_DECL_REFCOUNTING(AutoMounter)
 
-  typedef nsTArray<nsRefPtr<Volume>> VolumeArray;
+  typedef nsTArray<RefPtr<Volume>> VolumeArray;
 
   AutoMounter()
     : mResponseCallback(new AutoMounterResponseCallback),
       mMode(AUTOMOUNTER_DISABLE)
   {
     VolumeManager::RegisterStateObserver(&mVolumeManagerStateObserver);
     Volume::RegisterObserver(&mVolumeEventObserver);
 
     VolumeManager::VolumeArray::size_type numVolumes = VolumeManager::NumVolumes();
     VolumeManager::VolumeArray::index_type i;
     for (i = 0; i < numVolumes; i++) {
-      nsRefPtr<Volume> vol = VolumeManager::GetVolume(i);
+      RefPtr<Volume> vol = VolumeManager::GetVolume(i);
       if (vol) {
         vol->RegisterObserver(&mVolumeEventObserver);
         // We need to pick up the intial value of the
         // ums.volume.NAME.enabled setting.
         AutoMounterSetting::CheckVolumeSettings(vol->Name());
       }
     }
 
@@ -193,17 +193,17 @@ public:
     UpdateState();
   }
 
   ~AutoMounter()
   {
     VolumeManager::VolumeArray::size_type numVolumes = VolumeManager::NumVolumes();
     VolumeManager::VolumeArray::index_type volIndex;
     for (volIndex = 0; volIndex < numVolumes; volIndex++) {
-      nsRefPtr<Volume> vol = VolumeManager::GetVolume(volIndex);
+      RefPtr<Volume> vol = VolumeManager::GetVolume(volIndex);
       if (vol) {
         vol->UnregisterObserver(&mVolumeEventObserver);
       }
     }
     Volume::UnregisterObserver(&mVolumeEventObserver);
     VolumeManager::UnregisterStateObserver(&mVolumeManagerStateObserver);
   }
 
@@ -247,67 +247,67 @@ public:
       mMode = aMode;
       DBG("Calling UpdateState due to mode set to %d", mMode);
       UpdateState();
     }
   }
 
   void SetSharingMode(const nsACString& aVolumeName, bool aAllowSharing)
   {
-    nsRefPtr<Volume> vol = VolumeManager::FindVolumeByName(aVolumeName);
+    RefPtr<Volume> vol = VolumeManager::FindVolumeByName(aVolumeName);
     if (!vol) {
       return;
     }
     if (vol->IsSharingEnabled() == aAllowSharing) {
       return;
     }
     vol->SetUnmountRequested(false);
     vol->SetMountRequested(false);
     vol->SetSharingEnabled(aAllowSharing);
     DBG("Calling UpdateState due to volume %s shareing set to %d",
         vol->NameStr(), (int)aAllowSharing);
     UpdateState();
   }
 
   void FormatVolume(const nsACString& aVolumeName)
   {
-    nsRefPtr<Volume> vol = VolumeManager::FindVolumeByName(aVolumeName);
+    RefPtr<Volume> vol = VolumeManager::FindVolumeByName(aVolumeName);
     if (!vol) {
       return;
     }
     if (vol->IsFormatRequested()) {
       return;
     }
     vol->SetUnmountRequested(false);
     vol->SetMountRequested(false);
     vol->SetFormatRequested(true);
     DBG("Calling UpdateState due to volume %s formatting set to %d",
         vol->NameStr(), (int)vol->IsFormatRequested());
     UpdateState();
   }
 
   void MountVolume(const nsACString& aVolumeName)
   {
-    nsRefPtr<Volume> vol = VolumeManager::FindVolumeByName(aVolumeName);
+    RefPtr<Volume> vol = VolumeManager::FindVolumeByName(aVolumeName);
     if (!vol) {
       return;
     }
     vol->SetUnmountRequested(false);
     if (vol->IsMountRequested() || vol->mState == nsIVolume::STATE_MOUNTED) {
       return;
     }
     vol->SetMountRequested(true);
     DBG("Calling UpdateState due to volume %s mounting set to %d",
         vol->NameStr(), (int)vol->IsMountRequested());
     UpdateState();
   }
 
   void UnmountVolume(const nsACString& aVolumeName)
   {
-    nsRefPtr<Volume> vol = VolumeManager::FindVolumeByName(aVolumeName);
+    RefPtr<Volume> vol = VolumeManager::FindVolumeByName(aVolumeName);
     if (!vol) {
       return;
     }
     if (vol->IsUnmountRequested()) {
       return;
     }
     vol->SetMountRequested(false);
     vol->SetUnmountRequested(true);
@@ -444,17 +444,17 @@ AutoMounter::UpdateState()
   LOG("UpdateState: umsAvail:%d umsEnabled:%d mode:%d usbCablePluggedIn:%d tryToShare:%d",
       umsAvail, umsEnabled, mMode, usbCablePluggedIn, tryToShare);
 
   bool filesOpen = false;
   static unsigned filesOpenDelayCount = 0;
   VolumeArray::index_type volIndex;
   VolumeArray::size_type  numVolumes = VolumeManager::NumVolumes();
   for (volIndex = 0; volIndex < numVolumes; volIndex++) {
-    nsRefPtr<Volume>  vol = VolumeManager::GetVolume(volIndex);
+    RefPtr<Volume>  vol = VolumeManager::GetVolume(volIndex);
     Volume::STATE   volState = vol->State();
 
     if (vol->State() == nsIVolume::STATE_MOUNTED) {
       LOG("UpdateState: Volume %s is %s and %s @ %s gen %d locked %d sharing %c",
           vol->NameStr(), vol->StateStr(),
           vol->MediaPresent() ? "inserted" : "missing",
           vol->MountPoint().get(), vol->MountGeneration(),
           (int)vol->IsMountLocked(),
--- a/dom/system/gonk/VolumeCommand.h
+++ b/dom/system/gonk/VolumeCommand.h
@@ -34,17 +34,17 @@ class VolumeCommand;
 ***************************************************************************/
 
 class VolumeResponseCallback
 {
 protected:
   virtual ~VolumeResponseCallback() {}
 
 public:
-  NS_INLINE_DECL_REFCOUNTED(VolumeResponseCallback)
+  NS_INLINE_DECL_REFCOUNTING(VolumeResponseCallback)
   VolumeResponseCallback()
     : mResponseCode(0), mPending(false) {}
 
   bool Done() const
   {
     // Response codes from the 200, 400, and 500 series all indicated that
     // the command has completed.