Commit Graph
56 Commits
Author SHA1 Message Date
Nathan Froyd 4e6d8f6705 Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat
The bulk of this commit was generated with a script, executed at the top
level of a typical source code checkout.  The only non-machine-generated
part was modifying MFBT's moz.build to reflect the new naming.

CLOSED TREE makes big refactorings like this a piece of cake.

 # The main substitution.
find . -name '*.cpp' -o -name '*.cc' -o -name '*.h' -o -name '*.mm' -o -name '*.idl'| \
    xargs perl -p -i -e '
 s/nsRefPtr\.h/RefPtr\.h/g; # handle includes
 s/nsRefPtr ?</RefPtr</g;   # handle declarations and variables
'

 # Handle a special friend declaration in gfx/layers/AtomicRefCountedWithFinalize.h.
perl -p -i -e 's/::nsRefPtr;/::RefPtr;/' gfx/layers/AtomicRefCountedWithFinalize.h

 # Handle nsRefPtr.h itself, a couple places that define constructors
 # from nsRefPtr, and code generators specially.  We do this here, rather
 # than indiscriminantly s/nsRefPtr/RefPtr/, because that would rename
 # things like nsRefPtrHashtable.
perl -p -i -e 's/nsRefPtr/RefPtr/g' \
     mfbt/nsRefPtr.h \
     xpcom/glue/nsCOMPtr.h \
     xpcom/base/OwningNonNull.h \
     ipc/ipdl/ipdl/lower.py \
     ipc/ipdl/ipdl/builtin.py \
     dom/bindings/Codegen.py \
     python/lldbutils/lldbutils/utils.py

 # In our indiscriminate substitution above, we renamed
 # nsRefPtrGetterAddRefs, the class behind getter_AddRefs.  Fix that up.
find . -name '*.cpp' -o -name '*.h' -o -name '*.idl' | \
    xargs perl -p -i -e 's/nsRefPtrGetterAddRefs/RefPtrGetterAddRefs/g'

if [ -d .git ]; then
    git mv mfbt/nsRefPtr.h mfbt/RefPtr.h
else
    hg mv mfbt/nsRefPtr.h mfbt/RefPtr.h
fi
2015-10-18 01:24:48 -04:00
Nathan Froyd bf7f6dda03 Bug 1207245 - part 3 - switch all uses of mozilla::RefPtr<T> to nsRefPtr<T>; r=ehsan
This commit was generated using the following script, executed at the
top level of a typical source code checkout.

 # Don't modify select files in mfbt/ because it's not worth trying to
 # tease out the dependencies currently.
 #
 # Don't modify anything in media/gmp-clearkey/0.1/ because those files
 # use their own RefPtr, defined in their own RefCounted.h.
find . -name '*.cpp' -o -name '*.h' -o -name '*.mm' -o -name '*.idl'| \
    grep -v 'mfbt/RefPtr.h' | \
    grep -v 'mfbt/nsRefPtr.h' | \
    grep -v 'mfbt/RefCounted.h' | \
    grep -v 'media/gmp-clearkey/0.1/' | \
    xargs perl -p -i -e '
 s/mozilla::RefPtr/nsRefPtr/g; # handle declarations in headers
 s/\bRefPtr</nsRefPtr</g; # handle local variables in functions
 s#mozilla/RefPtr.h#mozilla/nsRefPtr.h#; # handle #includes
 s#mfbt/RefPtr.h#mfbt/nsRefPtr.h#;       # handle strange #includes
'

 # |using mozilla::RefPtr;| is OK; |using nsRefPtr;| is invalid syntax.
find . -name '*.cpp' -o -name '*.mm' | xargs sed -i -e '/using nsRefPtr/d'

 # RefPtr.h used |byRef| for dealing with COM-style outparams.
 # nsRefPtr.h uses |getter_AddRefs|.
 # Fixup that mismatch.
find . -name '*.cpp' -o -name '*.h'| \
    xargs perl -p -i -e 's/byRef/getter_AddRefs/g'
2015-10-18 00:40:10 -04:00
Sotaro Ikeda 7b74d14537 Bug 1208155 - Make hal functions explicit in AudioManager r=alwu 2015-09-25 04:56:28 -07:00
Alphan Chen 535d9ba004 Bug 1179691 - [Automounter] Fix the problem of get format and share request in the same time. r=dhylands 2015-07-07 16:39:03 +08:00
Juan Gomez 89035d527e Bug 1171931 - Refactor duplicated code using XRE_IsParent/ContentProcess. r=froydnj 2015-07-03 18:29:00 -07:00
Ryan VanderMeulen 7aba9d7002 Backed out changeset 8b4e4083639e (bug 1171931) for B2G debug emulator bustage. 2015-06-25 19:48:42 -04:00
Juan Gomez 7323e89a40 Bug 1171931 - Refactor duplicated code using XRE_IsParent/ContentProcess. r=froydnj 2015-06-24 14:11:00 -04:00
Alphan Chen 76f38a4eb6 Bug 1158047 - [AutoMounter] Resolve the problem of stucking in UMS_CONFIGURING state. r=dhylands 2015-05-04 14:46:16 +08:00
Alphan Chen 57e9b589d6 Bug 1131927 - [Automounter] Add reporter to get current information. r=dhylands 2015-04-20 10:58:13 +08:00
Ehsan Akhgari ea41d8de48 Bug 1145631 - Part 1: Replace MOZ_OVERRIDE and MOZ_FINAL with override and final in the tree; r=froydnj
This patch was automatically generated using the following script:

function convert() {
echo "Converting $1 to $2..."
find . \
       ! -wholename "*/.git*" \
       ! -wholename "obj-ff-dbg*" \
         -type f \
      \( -iname "*.cpp" \
         -o -iname "*.h" \
         -o -iname "*.c" \
         -o -iname "*.cc" \
         -o -iname "*.idl" \
         -o -iname "*.ipdl" \
         -o -iname "*.ipdlh" \
         -o -iname "*.mm" \) | \
    xargs -n 1 sed -i -e "s/\b$1\b/$2/g"
}

convert MOZ_OVERRIDE override
convert MOZ_FINAL final
2015-03-21 12:28:04 -04:00
Thomas Zimmermann 8ce42b1eaa Bug 1137151: Marked destructors of ref-counted auto-mounter classes as protected, r=dhylands 2015-03-10 13:44:02 +01:00
Alphan Chen bed7f06822 Bug 1113518 - [automounter] Add a case for fuse and add some useful logs. r=dhylands 2015-01-27 13:54:31 +08:00
Eden Chuang 3dd106c57b Bug 1091544 - Set volume as STATE_MOUNT_FAIL while mounting the volume failed, r=dhylands. 2015-01-12 12:01:07 +08:00
Dave Hylands b884060207 Bug 1085743 - MTP doesn't work on Nexus 4/5. r=alchen 2014-11-13 17:42:38 -08:00
Dave Hylands f42d969753 Bug 1095801 - Make adb work properly on user builds (Nexus 4/5). r=fabrice 2014-11-10 23:30:07 -08:00
Dave Hylands d32798d8f8 Bug 1086712 - Don't drop adb connection unnecessarily at startup. r=jld 2014-11-07 18:49:21 -08:00
Dave Hylands dc55c1987a Bug 1091174 - Clean up some AutoMounter calls to register/unregister volume observers. r=mikeh 2014-11-03 16:26:59 -08:00
Eden Chuang bc95f1ec42 Bug 1074590 - Adding volume accessbility checking before set it as mounted. r=dhylands 2014-10-31 10:30:48 +08:00
Dave Hylands c3f1a3f493 Bug 1072576 - Register storages with MTP Server before starting it. r=echou 2014-10-21 17:28:12 -07:00
Alphan Chen ff283ae562 Bug 1060196 - Mark the volume as if we've started unmounting. r=dhylands 2014-09-22 11:42:33 +08:00
Dave Hylands 46267aea38 Bug 1054191 - AutoMounter should accomodate rndis. r=echou 2014-09-05 21:37:27 -07:00
Dave Hylands b758476b66 Bug 1059086 - Stop and start MTP server properly when USB cable is unplugged and replugged. r=Alphan 2014-08-28 13:13:10 -07:00
Dave Hylands eb2d5d2056 Bug 1049243 - Integrate MTP and Device Storage. r=echou 2014-08-28 13:13:06 -07:00
Dave Hylands 7c2696bb01 Bug 1049240 - Integrate MTP with the AutoMounter. r=echou 2014-08-19 13:41:35 -07:00
Nigel Babu f41a68fe2b Backed out changeset 19e59c14b0aa (bug 1049240) for xpshell bustage 2014-08-20 12:19:36 +05:30
Dave Hylands f013445d71 Bug 1049240 - Integrate MTP with the AutoMounter. r=echou 2014-08-19 13:41:35 -07:00
Dave Hylands e3133bb56b Bug 1029533 - Initial standup of MTP server. r=echou
Note: This will be off by default. Currently, you need to do:

adb shell setprop sys.usb.config mtp,adb

in order to activate the MTP server.
2014-07-11 14:42:15 -07:00
Dave Hylands b4694deedd Bug 1026320 - Deal with race condition due to slow response from VolumeManager. r=qDot 2014-06-17 13:37:24 -07:00
Dave Hylands 02e8b92434 Bug 1015006 - Detect USB cable unplugged and set sharing to false. r=qDot
If the USB cable is pulled after we call SetIsSharing(true) but before we actually initiate the
sharing operation, then the volume doesn't change state, and mIsSharing never gets set back to
false. So we detect this condition now and force mIsSharing to be false when the USB cable is
unplugged.
2014-05-27 15:47:26 -07:00
Kyle Huey 8bff90fcd8 Bug 991812: B2G Fixups CLOSED TREE. r=me 2014-04-15 15:26:43 -07:00
Kyle Huey 78f6f38554 Bug 991812: Remove uses of RefCounted<T> that live in Gecko. r=ehsan 2014-04-14 12:04:24 -07:00
Ryan VanderMeulen 5aa07e1977 Backed out changesets ddbac34527fe and fa82f32d0c39 (bug 991812) for B2G bustage.
CLOSED TREE
2014-04-14 16:16:18 -04:00
Kyle Huey 613b19edaa Bug 991812: Remove uses of RefCounted<T> that live in Gecko. r=ehsan 2014-04-14 12:04:24 -07:00
Alan Huang a872ceae19 Bug 971612 - Implement "mount" and "unmount" API for device storage. r=dhylands 2014-03-04 19:24:19 +08:00
Ehsan Akhgari c356429b5a Bug 935778 - Part 0.4: Spray even more MOZ_DECLARE_REFCOUNTED_TYPENAME across the tree 2014-02-21 09:11:33 -05:00
Clayton Hughes 88f277119a Bug 931424 - Fix AutoMounter to use AutoRestore instead of AutoBool. r=dhylands 2013-11-01 18:02:31 -07:00
Alan Huang 2380c93740 Bug 841660 - Implement format interface for volume-based device storage, r=dhylands 2013-09-06 14:11:58 +08:00
Birunthan Mohanathas 87889c27b7 Bug 784739 - Switch from NULL to nullptr in dom/ (2/2); r=ehsan 2013-10-28 10:04:47 -04:00
Dave Hylands d643127360 Bug 928558 - AutoMounter mark volumes as shared a bit early when open files are detected. r=qDot 2013-10-18 20:21:52 -07:00
Dave Hylands cc094ecb21 Bug 927961 - Add ums.status so that settings app can determine if files are open. r=gwagner 2013-10-17 15:41:46 -07:00
Dave Hylands afda864736 Bug 878310 - Improve DeviceStorage volume status reporting. r=qDot
This changeset causes tranistory states when changing from mounted to shared,
and back to mounted to be reported as shared instead of unavailable.

We also don't send the same status twice in a row.
2013-08-22 16:12:25 -07:00
Viral Wang 67d4b0322c Bug 890144 - Add function InitVolumeConfig to add volume by configuration file in AutoMounter. r=dhylands 2013-07-23 08:30:35 -04:00
Dave Hylands fb38ee3767 Bug 876782 - Automounter shouldn't unmount so agressively. r=qdot 2013-07-16 13:14:09 -07:00
Dave Hylands d0ab8ff7eb Bug 852768 - Make AutoMounter use the new settings to support internal/external storage. r=qDot 2013-05-13 17:53:23 -07:00
Vasil Dimov 328199ed67 Bug 819016 - Create some helper functions for reading /sys files. r=bsmedberg 2013-03-27 11:19:09 -04:00
Dave Hylands 4c68e4054e Bug 785124 - Pt 4 - Whitespace only change. Change "type &var" to "type& var" and ptrs. r=dougt 2013-01-07 17:43:02 +01:00
Dave Hylands e122c2c0cd Bug 785124 - Pt 1 - Add VolumeMountLock which allows SDCard to be locked. r=dougt
From 8e39b8e5f3ab7e6344b0a8a5eeabdcf672de8fb4 Mon Sep 17 00:00:00 2001
---
 dom/ipc/ContentChild.cpp                  |   18 +++-
 dom/ipc/ContentChild.h                    |    5 +-
 dom/ipc/ContentParent.cpp                 |   22 +++-
 dom/ipc/ContentParent.h                   |    2 +
 dom/ipc/PContent.ipdl                     |    6 +-
 dom/system/gonk/AutoMounter.cpp           |   19 +++-
 dom/system/gonk/Makefile.in               |    4 +-
 dom/system/gonk/Volume.cpp                |   62 ++++++++++-
 dom/system/gonk/Volume.h                  |   11 +-
 dom/system/gonk/VolumeServiceIOThread.cpp |   11 +-
 dom/system/gonk/VolumeServiceIOThread.h   |    7 +-
 dom/system/gonk/nsIVolume.idl             |   21 +++-
 dom/system/gonk/nsIVolumeMountLock.idl    |   12 +++
 dom/system/gonk/nsIVolumeService.idl      |    9 +-
 dom/system/gonk/nsVolume.cpp              |   96 ++++++++++++++++-
 dom/system/gonk/nsVolume.h                |   43 ++++++--
 dom/system/gonk/nsVolumeMountLock.cpp     |  157 +++++++++++++++++++++++++++
 dom/system/gonk/nsVolumeMountLock.h       |   55 ++++++++++
 dom/system/gonk/nsVolumeService.cpp       |  168 +++++++++++++++++++++++------
 dom/system/gonk/nsVolumeService.h         |   20 +++-
 layout/build/nsLayoutModule.cpp           |    5 +-
 layout/build/nsLayoutStatics.cpp          |    9 ++
 22 files changed, 684 insertions(+), 78 deletions(-)
 create mode 100644 dom/system/gonk/nsIVolumeMountLock.idl
 create mode 100644 dom/system/gonk/nsVolumeMountLock.cpp
 create mode 100644 dom/system/gonk/nsVolumeMountLock.h
2012-12-14 16:01:34 -08:00
Phil Ringnalda d137321fea Back out 6737ce4d3ce6:599c37ed628c (bug 785124) for b2g Arm xpcshell orange in update tests 2013-01-07 22:59:32 -08:00
Dave Hylands d2c7d9fdc4 Bug 785124 - Pt 4 - Whitespace only change. Change "type &var" to "type& var" and ptrs. r=dougt 2013-01-07 17:43:02 +01:00
Dave Hylands 80270c8d7f Bug 785124 - Pt 1 - Add VolumeMountLock which allows SDCard to be locked. r=dougt
From 8e39b8e5f3ab7e6344b0a8a5eeabdcf672de8fb4 Mon Sep 17 00:00:00 2001
---
 dom/ipc/ContentChild.cpp                  |   18 +++-
 dom/ipc/ContentChild.h                    |    5 +-
 dom/ipc/ContentParent.cpp                 |   22 +++-
 dom/ipc/ContentParent.h                   |    2 +
 dom/ipc/PContent.ipdl                     |    6 +-
 dom/system/gonk/AutoMounter.cpp           |   19 +++-
 dom/system/gonk/Makefile.in               |    4 +-
 dom/system/gonk/Volume.cpp                |   62 ++++++++++-
 dom/system/gonk/Volume.h                  |   11 +-
 dom/system/gonk/VolumeServiceIOThread.cpp |   11 +-
 dom/system/gonk/VolumeServiceIOThread.h   |    7 +-
 dom/system/gonk/nsIVolume.idl             |   21 +++-
 dom/system/gonk/nsIVolumeMountLock.idl    |   12 +++
 dom/system/gonk/nsIVolumeService.idl      |    9 +-
 dom/system/gonk/nsVolume.cpp              |   96 ++++++++++++++++-
 dom/system/gonk/nsVolume.h                |   43 ++++++--
 dom/system/gonk/nsVolumeMountLock.cpp     |  157 +++++++++++++++++++++++++++
 dom/system/gonk/nsVolumeMountLock.h       |   55 ++++++++++
 dom/system/gonk/nsVolumeService.cpp       |  168 +++++++++++++++++++++++------
 dom/system/gonk/nsVolumeService.h         |   20 +++-
 layout/build/nsLayoutModule.cpp           |    5 +-
 layout/build/nsLayoutStatics.cpp          |    9 ++
 22 files changed, 684 insertions(+), 78 deletions(-)
 create mode 100644 dom/system/gonk/nsIVolumeMountLock.idl
 create mode 100644 dom/system/gonk/nsVolumeMountLock.cpp
 create mode 100644 dom/system/gonk/nsVolumeMountLock.h
2012-12-14 16:01:34 -08:00