Commit Graph
13 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
Benoit Girard e3334d416c Bug 1178892 - Split the profiler into Core & Gecko files and break apart monolithic headers. r=mstange 2015-06-30 15:03:45 -04:00
Benoit Girard f08c935552 Bug 1172186 - Make the profiler build standalone. r=mstange 2015-06-18 01:05:42 -04:00
Tom Tromey 3ce2900136 Bug 1159486 - Make profiler use the process creation time. r=shu, r=jsantell 2015-06-16 22:28:00 -04:00
Markus Stange b1e09930f6 Bug 1127498 - Share one buffer between all threads, improve marker lifetime management, some code cleanup. r=BenWa 2015-01-30 14:49:32 -05:00
Tom Tromey 9ec8ed515c Bug 1047124 - Clean up memory leaks. r=BenWa 2014-12-11 09:41:00 -05:00
Benoit Girard c4e5f92747 Bug 1054110 - Let profiling circular buffer survive thread shutdown. r=ehsan 2014-10-06 14:12:52 -04:00
Benoit Girard 50e6565791 Bug 1021990 - Migrate to xpcom based EventTracer. r=ehsan 2014-06-06 17:53:42 -04:00
Victor Porof 40f4cc8d75 Bug 1017790 - Expose category information in the profiler data, r=djvj 2014-06-04 14:37:49 -04:00
Viktor Stanchev c93739f9f4 Bug 986160 - Create unit tests for the Gecko Profiler. r=benwa 2014-04-07 15:29:07 -04:00
Wes Kocher 40d7467342 Backed out changeset 1e38b4aa8889 (bug 986160) for breaking Nightly builds 2014-04-04 14:54:19 -07:00
Viktor Stanchev 235452aca9 Bug 986160 - Create unit tests for the Gecko Profiler. r=benwa 2014-04-04 10:11:41 +08:00