Граф коммитов

11 Коммитов

Автор SHA1 Сообщение Дата
Brian Hackett bae5179cfb Bug 1502207 Part 2 - Fix useUse new atomic access API in Gecko, r=froydnj.
--HG--
extra : rebase_source : 2b9b5bb77fb53cd9f028912b4ba54136c9066447
2018-10-25 11:42:18 -10:00
Brian Hackett 19be0573fa Bug 1207696 Part 4a - Make recording optional in mozilla::RefCounted, r=ehsan.
--HG--
extra : rebase_source : 4bf53b557247ac82933f4da70cccddafa6c2c7b2
2018-07-21 14:21:39 +00:00
Nathan Froyd 840ac6d981 Bug 1385438 - make mozilla::RefCounted use the strongest memory consistency necessary; r=jrmuizel
We don't need to use sequential consistency for everything, we can get
by with using weaker memory consistency models depending on the operation.
2017-10-27 13:05:51 -04:00
Luke Wagner 7f0959b60f Bug 1313351 - Fix js::RefCounted to not do leak checking. r=jandem 2016-12-23 21:13:26 +01:00
Luke Wagner 549d7571b3 Bug 1320905 - Add js::RefCounted that uses js_delete (r=waldo) 2016-12-05 15:59:18 -08:00
Carsten "Tomcat" Book 1e97bdd3fb Backed out changeset f38852711f38 (bug 1320905) for bustage on a CLOSED TREE
--HG--
extra : amend_source : 2e75cec3778e0ceb8a5d99d94004968604403f3a
2016-12-05 16:13:36 +01:00
Luke Wagner 0bf74100a8 Bug 1320905 - Add js::RefCounted that uses js_delete (r=waldo)
MozReview-Commit-ID: D0mSwdm0nn0
2016-12-05 08:46:27 -06:00
Eric Rahm c47a83ce36 Bug 1251769 - Remove remaining references to MOZILLA_XPCOMRT_API from mfbt. r=froydnj 2016-02-27 11:12:07 -08: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
Nathan Froyd 483783681e Bug 1207245 - part 4 - remove RefPtr.h; r=ehsan
It has been superseded by the availability of nsRefPtr.h.
2015-10-18 00:40:16 -04:00
Nathan Froyd 5761751aa3 Bug 1207245 - part 1 - move RefCounted<T> to its own file
Various bits depend on RefPtr.h to provide RefCounted<T> and RefPtr<T>.
It will be easier to manage an automatic conversion from RefPtr<T> to
nsRefPtr<T> if we split out the dependency on RefCounted<T> first.
2015-09-22 21:27:34 -04:00