Andrew McCreight
e5fea6eaa1
Bug 1279998
- Remove NSCAP_FEATURE_TEST_NONNULL_QUERY_SUCCEEDS. r=froydnj
...
MozReview-Commit-ID: LbT6922qlHQ
--HG--
extra : rebase_source : f59298236c3905c4c92d261ffe93847584d24bb6
2016-08-01 11:16:19 -07:00
Aryeh Gregor
32bf86a025
Bug 1193762 part 9 - Delete nsCOMPtr<T>::operator T*()&&; r=froydnj
2016-05-01 21:29:23 +03:00
Nathan Froyd
01583602a9
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
--HG--
rename : mfbt/nsRefPtr.h => mfbt/RefPtr.h
2015-10-18 01:24:48 -04:00
Xidorn Quan
9960d37ffb
Bug 1196050 - Replace NSCAP_Zero usage with decltype(nullptr). r=froydnj
...
--HG--
extra : source : 9c567ed00fcf2433e484325bab9a18322718b0da
2015-08-20 10:30:10 +10:00
Aryeh Gregor
f29bc4307b
Bug 1010756 - Helpful errors for using nsCOMPtr on non-XPCOM types; r=froydnj
2015-08-12 18:43:10 +03:00
Aryeh Gregor
80ea0a3e53
Bug 1190823 - Move OwningNonNull.h to xpcom/base/; r=froydnj
...
--HG--
rename : dom/bindings/OwningNonNull.h => xpcom/base/OwningNonNull.h
2015-08-05 15:28:27 +03:00
Bobby Holley
97b9240b34
Bug 1188696
- Hoist nsRefPtr.h into MFBT. r=froydnj
2015-07-29 10:44:59 -07:00
Bobby Holley
4762225b99
Bug 1188696
- Remove the XPCOM dependencies in nsRefPtr.h. r=froydnj
2015-07-29 10:44:58 -07:00
Nathan Froyd
ff82112704
Bug 1156790 - mark various nsCOMPtr_helper-esque classes as final; r=mccr8
2015-04-20 16:58:15 -04:00
Andrea Marchesini
ade2831035
Bug 1156632 - Remove unused forward class declarations - patch 6 - the rest of the tree, r=ehsan
2015-04-22 08:29:24 +02:00
Aryeh Gregor
044c421f96
Bug 1153649 part 3 - More OwningNonNull improvements; r=bz
2015-04-19 15:28:50 +03:00
Ehsan Akhgari
883849ee32
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
Nicholas Nethercote
242708cf72
Bug 1127201 (attempt 2, part 1) - Replace most NS_ABORT_IF_FALSE calls with MOZ_ASSERT. r=Waldo.
...
--HG--
extra : rebase_source : 488e401ff87e31a2074c4108c4df0572d9536667
2015-02-09 14:34:50 -08:00
Andrew McCreight
d3826daa16
Back out Bug 1127201 (part 2) for various problems.
2015-02-06 15:04:32 -08:00
Nicholas Nethercote
d34f0301b8
Bug 1127201 (part 2) - Convert all NS_ABORT_IF_FALSE calls to MOZ_ASSERT. r=Waldo.
...
--HG--
extra : rebase_source : 99182e70335d2b5ff95f8c528ae992d37294be3a
2015-02-04 20:05:36 -08:00
Ehsan Akhgari
fa5c39586f
Bug 1123121 - Mark all nsCOMPtr_helper classes as stack class; r=froydnj
2015-01-19 12:39:36 -05:00
Masatoshi Kimura
bf312ad056
Bug 1120062 - Part 1: Remove most Nullptr.h includes. r=waldo
2015-01-11 11:34:52 +09:00
Ehsan Akhgari
bbb500e982
Bug 1116906 - Move AlreadyAddRefed.h to MFBT; r=froydnj
2015-01-07 11:51:29 -05:00
Ehsan Akhgari
860da94550
Bug 1114999 - Part 2: Apply MOZ_NO_ADDREF_RELEASE_ON_RETURN to all smart pointer arrow operators that can return refcounted objects; r=jrmuizel
2015-01-06 16:30:03 -05:00
Ehsan Akhgari
9297631e0b
Bug 1114880 follow-up: Rename MOZ_{STRONG,WEAK}_REF to MOZ_{OWNING,NON_OWNING}_REF
...
--HG--
extra : rebase_source : 51fff0785d112b5b87be3c6ff723c8986b37effe
2014-12-23 21:17:50 -05:00
Ehsan Akhgari
cd824d4b94
Bug 1114880 - Annotate some strong and weak references in XPCOM; r=froydnj
...
--HG--
extra : rebase_source : 3af3de656b98c8f41ed0330f205f9958a384c30c
2014-12-23 17:27:48 -05:00
Nathan Froyd
7873eb0325
Bug 1095541 - part 2 - move already_AddRefed to its own header file; r=bsmedberg
2014-11-07 11:17:41 -05:00
Nathan Froyd
7c3afbd946
Bug 1095633 - part 1 - remove uses of HAVE_CPP_TROUBLE_COMPARING_TO_ZERO from headers; r=bz
2014-11-07 14:44:12 -05:00
Nicholas Nethercote
f57e56e187
Bug 1058388 - Remove NS_COM_GLUE and IMETHOD_VISIBILITY. r=bsmedberg.
...
--HG--
extra : rebase_source : 250ec1323d4097101a8e0331a2bf7fab59f72b1d
2014-08-27 15:47:27 -07:00
Birunthan Mohanathas
dffead394b
Bug 1046841 - Fix comment style of nsCOMPtr.h. r=froydnj
2014-08-25 12:17:20 -07:00
Jeff Walden
e9e4aa4f5e
Bug 1044598 - Make nsCOMPtr.h no longer depend on the un-definition of MOZ_HAVE_CXX11_NULLPTR. r=ehsan
...
--HG--
extra : rebase_source : cc737646470e6ebb81f87d3a0751f20b712c9390
2014-07-29 11:41:45 -07:00
Birunthan Mohanathas
c9fb2c0d48
Bug 1022456 - Fix modelines in xpcom/{base,glue,io,string,threads}/. r=froydnj
2014-06-30 08:39:45 -07:00
Birunthan Mohanathas
6b53f3d634
Bug 1022456 - Convert xpcom/glue/ to Gecko style. r=froydnj
2014-06-26 18:35:39 -07:00
Chris Peterson
4d8cb6ff03
Bug 1013065 - Remove bug 65664's NSCAP_DONT_PROVIDE_NONCONST_OPEQ workaround. r=dbaron
2014-05-04 23:11:04 -07:00
Ehsan Akhgari
6011b07362
Bug 1015430 - Fix more XPCOM constructors to clarify whether they should be explicit; r=froydnj
2014-05-25 21:16:01 -04:00
Nathan Froyd
4bb75e1989
Bug 984443 - get rid of #ifndef $OTHER_HEADER bits from xpcom/ as relics of a bygone era; r=ehsan
2014-03-17 12:20:47 -04:00
Kyle Huey
817b5ccbd9
Bug 345123: Remove nsGetterAddRefs<T>'s operator nsISupports**. r=bsmedberg
2014-03-15 12:00:17 -07:00
Kyle Huey
b564544cf7
Bug 967364: Pass already_AddRefed by reference instead of by value. r=bsmedberg
2014-03-15 12:00:17 -07:00
Kyle Huey
1f3d658bb3
Bug 967364: Use every already_AddRefed. r=bsmedberg
2014-03-15 12:00:16 -07:00
Kyle Huey
65644eb5a0
Bug 967364: Privatize already_AddRefed::mRawPtr. r=bsmedberg
2014-03-15 12:00:15 -07:00
Kyle Huey
fe6c4e28d6
Bug 967364: Rename already_AddRefed::get to take. r=bsmedberg
2014-03-15 12:00:15 -07:00
L. David Baron
03ba2e465b
Bug 976350 patch 1: Move the contents of nsTraceRefcnt.h into nsISupportsImpl.h. r=bsmedberg
...
This makes sense since the file no longer contains anything with the
nsTraceRefcnt name in it, and it will allow renaming nsTraceRefcntImpl
back to nsTraceRefcnt.
2014-02-26 13:36:35 -08:00
Nathan Froyd
4efe7278e6
Bug 976161 - delete dead NSCAP_DISABLE_TEST_DONTQUERY_CASES code; r=bsmedberg
2014-02-24 13:02:43 -05:00
Jeff Walden
5d3f01c937
Bug 953296 - Implement mozilla::NullptrT as a typedef to use to accept nullptr values. Also add mozilla::IsNullPointer<T>, a trait for detecting *only* true nullptr (emulated nullptr [__null] used by gcc 4.4/4.5 isn't true nullptr). r=ehsan
...
Generally, if you want a decltype(nullptr)-based overload, you should use SFINAE and IsNullPointer. (Examples are provided in NullPtr.h comments.) The problem is NullptrT matches far more than just __null as emulated nullptr for gcc 4.4/4.5 overloading purposes. This problem is unavoidable without true nullptr. Currently, the only valid use for NullptrT is believed to be in operator overloads. All existing nullptr-overloading code has been rewritten to use the appropriate technique for the situation, and MOZ_HAVE_CXX11_NULLPTR is no longer an API.
--HG--
extra : rebase_source : 01abfcb66ae569db7b04a7b53f5cd5fd8151bffd
2014-01-02 17:27:41 -06:00
Birunthan Mohanathas
0cfca404c5
Bug 784739 - Switch from NULL to nullptr in xpcom/ (2/3); r=ehsan
2013-10-10 16:41:39 -04:00
Ehsan Akhgari
2824b29025
Bug 895322 - Part 1: Replace the usages of MOZ_STATIC_ASSERT with C++11 static_assert; r=Waldo
...
This patch was mostly generated by running the following scripts on the codebase, with some
manual changes made afterwards:
# static_assert.sh
#!/bin/bash
# Command to convert an NSPR integer type to the equivalent standard integer type
function convert() {
echo "Converting $1 to $2..."
find . ! -wholename "*nsprpub*" \
! -wholename "*security/nss*" \
! -wholename "*/.hg*" \
! -wholename "obj-ff-dbg*" \
! -name nsXPCOMCID.h \
! -name prtypes.h \
-type f \
\( -iname "*.cpp" \
-o -iname "*.h" \
-o -iname "*.cc" \
-o -iname "*.mm" \) | \
xargs -n 1 `dirname $0`/assert_replacer.py #sed -i -e "s/\b$1\b/$2/g"
}
convert MOZ_STATIC_ASSERT static_assert
hg rev --no-backup mfbt/Assertions.h \
media/webrtc/signaling/src/sipcc/core/includes/ccapi.h \
modules/libmar/src/mar_private.h \
modules/libmar/src/mar.h
# assert_replacer.py
#!/usr/bin/python
import sys
import re
pattern = re.compile(r"\bMOZ_STATIC_ASSERT\b")
def replaceInPlace(fname):
print fname
f = open(fname, "rw+")
lines = f.readlines()
for i in range(0, len(lines)):
while True:
index = re.search(pattern, lines[i])
if index != None:
index = index.start()
lines[i] = lines[i][0:index] + "static_assert" + lines[i][index+len("MOZ_STATIC_ASSERT"):]
for j in range(i + 1, len(lines)):
if lines[j].find(" ", index) == index:
lines[j] = lines[j][0:index] + lines[j][index+4:]
else:
break
else:
break
f.seek(0, 0)
f.truncate()
f.write("".join(lines))
f.close()
argc = len(sys.argv)
for i in range(1, argc):
replaceInPlace(sys.argv[i])
--HG--
extra : rebase_source : 4b4a4047d82f2c205b9fad8d56dfc3f1afc0b045
2013-07-18 13:59:53 -04:00
Ms2ger
1a40020bdd
Bug 213324 - Remove getter_AddRefs(T*); r=ehsan
2013-07-10 11:56:21 +02:00
Aryeh Gregor
52b3c9c146
Bug 859817 - Eliminate implicit conversion from raw pointer to already_AddRefed; r=bz sr=bsmedberg
2013-04-10 17:22:53 +03:00
Aryeh Gregor
f0404a303a
Bug 859817 - Remove implicit conversions from raw pointer to already_AddRefed; r=Ms2ger
2013-04-22 14:15:59 +03:00
Aryeh Gregor
2223e977f2
Bug 859817 - Introduce already_AddRefed.downcast(); r=ehsan
2013-04-21 14:56:06 +03:00
Joshua Cranmer
c8f20f3eb1
Bug 856108 - Port static analyses to clang, part 2f: use MOZ_STACK_CLASS in xpcom. r=bsmedberg
2013-04-11 22:21:40 -05:00
Boris Zbarsky
94ecd538e8
Bug 857645. Make it possible to copy-initialize an nsCOMPtr<T> from an already_AddRefed<U> as long as U inherits from T. r=ehsan
2013-04-03 22:33:34 -04:00
Phil Ringnalda
f827800026
Back out 8396d7543197 (bug 857645) for build bustage
...
CLOSED TREE
2013-04-04 22:27:19 -07:00
Boris Zbarsky
0611604263
Bug 857645. Make it possible to copy-initialize an nsCOMPtr<T> from an already_AddRefed<U> as long as U inherits from T. r=ehsan
2013-04-05 00:57:39 -04:00
Trevor Saunders
801c9b79ba
bug 822717 - remove checks for old gcc r=glandium
2012-12-18 13:22:28 -05:00