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

2413 Коммитов

Автор SHA1 Сообщение Дата
Andrew McCreight 84e0c59589 Bug 1231964 - Move CC participant code that touches JS out of mozglue. r=smaug
The JS engine does not export symbols outside of XUL, so having these
defined inside mozglue apparently causes linking errors on some
platforms with the patches in bug 1120016.

This patch moves enough methods outside of mozglue that the patch in
that other bug will still link on all platforms, without moving so
much out that there are other linking errors.

--HG--
rename : xpcom/glue/nsCycleCollectionParticipant.cpp => xpcom/base/nsCycleCollectorTraceJSHelpers.cpp
2015-12-18 14:22:01 -08:00
Nicholas Nethercote ddc78c3b0c Bug 1229458 - Remove SizeOfIncludingThisMustBeUnshared() from string classes. r=mccr8.
The patch changes all uses of SizeOfIncludingThisMustBeUnshared() to
SizeOfIncludingThisIfUnshared(). This incurs the (tiny) cost of an unnecessary
IsReadonly() check for guaranteed-unshared strings, but avoids the possible
assertion failures that would occur when MustBeUnshared() was used incorrectly
on shared strings, which is an easy mistake to make.

--HG--
extra : rebase_source : b1e91f1c19bcbe0521b0ce461d6c90512ca938ef
2015-12-01 15:36:26 -08:00
Nicholas Nethercote d180cd4a92 Bug 1181444 (part 1) - Remove nsBaseHashtable::EnumerateRead(). r=froydnj.
--HG--
extra : rebase_source : c07a83a2984ca4e67f3441d9e18b6bbac772495d
2015-11-22 14:39:01 -08:00
Nicholas Nethercote d63cd22524 Bug 1221376 - Remove PL_DHASH_STOP. r=froydnj.
All uses of it have been removed.
2015-11-03 17:22:15 -08:00
sajitk 8eb3a68c9e Bug 1201997 - Part 4 - Change size and offset variables to size_t.r=froydn 2015-11-15 14:48:08 +01:00
sajitk e97680a76a Bug 1201997 - Part 3 - Make internally used methods private. r=froydn 2015-11-15 14:48:02 +01:00
sajitk fa8035029e Bug 1201997 - Part 2 - Removing unused methods from the nsDeque class. r=froydn 2015-11-15 14:47:55 +01:00
sajitk 6418c52357 Bug 1201997 - Part 1 - Converted compiled test to gtest for nsDeque class. Added tests to test untested methods. r=froydn
--HG--
rename : xpcom/tests/TestDeque.cpp => xpcom/glue/tests/gtest/TestNsDeque.cpp
2015-11-15 14:47:49 +01:00
Botond Ballo 5bf85e9f9d Bug 1220923 - Make nsIntRegion a typedef for IntRegionTyped<UnknownUnits>. r=nical
--HG--
extra : source : 1f371f014048ed4c3c25095233fea927311a7e23
2015-11-04 11:49:49 -05:00
Chris Peterson 4a9be99fc7 Bug 1220544 - Fix -Wunreachable-code warnings in xpcom. r=mccr8
xpcom/glue/PLDHashTable.cpp:471:10 [-Wunreachable-code-return] 'return' will never be executed
xpcom/tests/TestAutoPtr.cpp:324:9 [-Wunreachable-code] code will never be executed
xpcom/tests/TestBlockingProcess.cpp:6:11 [-Wunreachable-code-return] 'return' will never be executed
2015-11-02 21:03:03 -08:00
Nathan Froyd a5557d1390 Bug 1219246 - use UniquePtr instead of nsAuto*Ptr in xpcom/; r=erahm 2015-10-31 13:47:14 -04:00
Birunthan Mohanathas e968844794 Bug 968520 - Always use fallible allocator with nsTArray_base::ShrinkCapacity. r=froydnj
We don't need infallible allocation here because failure to shrink the
capacity will leave the array unchanged.
2015-11-02 07:53:27 +02:00
Birunthan Mohanathas c6fdc8821b Bug 968520 - Explicitly use infallible allocator for ShiftData call in nsTArray::RemoveElementsAt. r=froydnj
This call will never fail so this merely makes the intent clear.
2015-11-02 07:53:27 +02:00
Birunthan Mohanathas ec6faa8712 Bug 1185763 - Part 6: Add fallible variant of r-value nsTArray::AppendElements. r=froydnj 2015-11-02 07:53:26 +02:00
Nathan Froyd 78c64c0cde Backout 5649b6b8cec3 (bug 1219246) for Linux xpcshell bustage 2015-10-31 13:34:06 -04:00
Nathan Froyd a5bf910f3f Bug 1219246 - use UniquePtr instead of nsAutoArrayPtr in xpcom/; r=erahm 2015-10-28 09:50:29 -04:00
Chris Peterson 4cbe614b32 Bug 1220035 - Fix -Wimplicit-fallthrough warnings in xpcom. r=mccr8
xpcom/base/nsDebugImpl.cpp:458:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
xpcom/ds/nsCheapSets.h:139:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
xpcom/ds/nsPersistentProperties.cpp:232:9 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
xpcom/ds/nsVariant.cpp:360:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
xpcom/ds/nsVariant.cpp:766:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
xpcom/ds/nsVariant.cpp:1658:9 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
xpcom/ds/nsVariant.cpp:1661:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
xpcom/glue/nsTextFormatter.cpp:355:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
xpcom/glue/nsTextFormatter.cpp:362:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
xpcom/io/nsWildCard.cpp:85:7 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
xpcom/io/nsWildCard.cpp:401:7 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
2015-10-29 21:31:32 -07:00
Carsten "Tomcat" Book 6d8a42769f Backed out changeset d84d5faa4852 (bug 1201997) for m2 perma failures
--HG--
rename : xpcom/glue/tests/gtest/TestNsDeque.cpp => xpcom/tests/TestDeque.cpp
extra : rebase_source : 689453beeca1b317d9b2f57889ba1b133b628821
2015-10-30 15:53:22 +01:00
Carsten "Tomcat" Book c6da644f91 Backed out changeset 9390b1ece0ad (bug 1201997)
--HG--
extra : rebase_source : 68e7e60c942c44905f4c9bd5f36977a9e8a9c5b0
2015-10-30 15:52:23 +01:00
Carsten "Tomcat" Book eb7db9ff93 Backed out changeset 91536bfeff0f (bug 1201997)
--HG--
extra : rebase_source : 6f11d67034e876738ecda6f1e32c8e655252660f
2015-10-30 15:52:21 +01:00
Carsten "Tomcat" Book 4c0ed54e29 Backed out changeset 9093e927a247 (bug 1201997)
--HG--
extra : rebase_source : c47b13e37a7756243a68cf15555bf176c0de8600
2015-10-30 15:52:18 +01:00
sajitk fe2a36f981 Bug 1201997 - Part 4 - Change size and offset variables to size_t.r=froydn
--HG--
extra : rebase_source : 0fd59eb6513e1af0162a9a02c6041182e556b9e7
2015-10-29 19:58:00 +01:00
sajitk 346dbc9c43 Bug 1201997 - Part 3 - Make internally used methods private. r=froydn
--HG--
extra : rebase_source : 0cf8b2f60b98f6853d495b8caad87117b3e5b9cb
2015-10-29 19:57:00 +01:00
sajitk c6255f9679 Bug 1201997: Part 2 - Removing unused methods from the nsDeque class. r=froydn
--HG--
extra : rebase_source : 1e6115ce85d19a25f59310863365586e669affef
2015-10-29 19:56:00 +01:00
sajitk d4bc9904dc Bug 1201997: Part 1 - Converted compiled test to gtest for nsDeque class. Added tests to test untested methods. r=froydn
--HG--
rename : xpcom/tests/TestDeque.cpp => xpcom/glue/tests/gtest/TestNsDeque.cpp
extra : rebase_source : 76fe6e0468ad1e0402a536bcb313bd4bb83f9c17
2015-10-29 19:55:00 +01:00
Nathan Froyd 9a687fd23b Bug 1217125 - remove pointless includes from nsTHashtable.h; r=mccr8 2015-10-03 00:47:14 -04:00
Eric Rahm e6f7a67577 Bug 1174785 - Part 1: Add LogModule, LogModuleManager, and LazyLogModule. r=froydnj
The logging interface is moved to xpcom/base, a LogModule wrapper for PR_Log is
added, a thread-safe LogModuleManager is added, and a LazyLogModule class used
to lazily load log modules in a thread-safe manner is added.

--HG--
rename : xpcom/glue/Logging.h => xpcom/base/Logging.h
extra : rebase_source : 89b76664d9477e2c894448cdea4dae1c61f8ca24
2015-10-19 12:22:11 -07:00
Ehsan Akhgari ecda739d3e Bug 1216177 - Remove the remaining nsRefPtr forward declarations; r=froydnj 2015-10-19 12:02:14 -04: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 932187b05a Bug 1212027 - part 6 - add an IsEmpty method to nsTHashtable; r=erahm
It's a little more convenient than checking Count(), and also gives
nsTHashtable the same interface as nsTArray (for this operation, at
least), which seems worthwhile.
2015-10-07 23:31:17 -04:00
Nathan Froyd 0a799593e9 Bug 1207245 - part 5 - rename template parameters for nsRefPtrHashtable; r=ehsan
Having a template parameter conflict with a global name is terribly
inconvenient, so let's try to avoid that by renaming the 'RefPtr'
template parameter to something else.
2015-10-12 22:40:08 -04:00
Xidorn Quan 6ab3d4ccd1 Bug 1213130 - Make several string function to accept char16ptr_t instead of char16_t*, and remove redundant overloads. rs=froydnj
--HG--
extra : source : d2dbd4e5316efb888335c92950d32ce77abc41e5
2015-10-10 12:19:23 +11:00
Xidorn Quan 7ba467bc22 Bug 1186745 part 6 - Fix event leak when using NS_DispatchToCurrentThread. r=froydnj
--HG--
extra : source : c8159664670c96e6cfa4c856d6eb14bb9495cd6f
2015-10-06 13:00:59 +11:00
Xidorn Quan 98d15627f8 Bug 1186745 part 1 - Add LeakRefPtr for pointer leaking by default. r=froydnj
This class can be used instead of raw pointer for a sound leaking-by-default
behavior. Also it could take advantage of move semantic check in the future.

--HG--
extra : source : 6bf72b4eaa92b13d42b547d8aeee677489a4d3e2
2015-10-06 13:00:59 +11:00
Nicholas Nethercote f72bee4d5f Bug 1209351 (part 1) - Add an overloading of nsTHashTable::RemoveEntry() that takes an already-found entry. r=froydnj.
--HG--
extra : rebase_source : 9e48b42e9bd59732e2c2a6c436e9ee258d5c1cd9
2015-09-24 16:12:38 -07:00
Nathan Froyd b98e01e02a Bug 1210871 - don't use reinterpret_cast in nsTHashtable.h; r=erahm
We don't need to reinterpret_cast when casting from void*, and we don't
need to reinterpret_cast when we're casting up and down a class
hierarchy.  static_cast takes care of those cases just fine, and doesn't
scare the reader into thinking that nsTHashtable is doing something
unusual.
2015-10-02 20:32:15 -04:00
Wes Kocher 1d312920f4 Backed out 6 changesets (bug 1186745) for android Cpp failures
Backed out changeset 237a6acf0709 (bug 1186745)
Backed out changeset 7b530871783a (bug 1186745)
Backed out changeset 73f73b531fc8 (bug 1186745)
Backed out changeset e36909748ddf (bug 1186745)
Backed out changeset 3a31df8787f0 (bug 1186745)
Backed out changeset df9cb8f5f0a5 (bug 1186745)
2015-10-02 10:35:09 -07:00
Xidorn Quan 863594b840 Bug 1186745 part 6 - Fix event leak when using NS_DispatchToCurrentThread. r=froydnj
--HG--
extra : source : a0baaf79582846e447014b2e933266c3150941aa
2015-10-03 00:18:24 +10:00
Xidorn Quan 4dad63f727 Bug 1186745 part 1 - Add LeakRefPtr for pointer leaking by default. r=froydnj
This class can be used instead of raw pointer for a sound leaking-by-default
behavior. Also it could take advantage of move semantic check in the future.

--HG--
extra : source : 47cd2c22bafc8d4bb1c7e1dce3b45517aaec199f
2015-10-03 00:18:24 +10:00
Nick Fitzgerald 30e17cfd82 Bug 1196461 - De-duplicate strings in heap snapshot core dumps; r=shu,jimb
This changeset replaces all of the

    // char16_t[]
    optional bytes someProperty = 1;

one- and two-byte string properties in the CoreDump.proto protobuf definition
file with:

    oneof {
        // char16_t[]
        bytes  someProperty    = 1;
        uint64 somePropertyRef = 2;
    }

The first time the N^th unique string is serialized, then someProperty is used
and the full string is serialized in the protobuf message. All following times
that string is serialized, somePropertyRef is used and its value is N.

Among the other things, this also changes JS::ubi::Edge::name from a raw pointer
with commented rules about who does or doesn't own and should and shouldn't free
the raw pointer to a UniquePtr that enforces those rules rather than relying on
developers reading and obeying the rules in the comments.
2015-09-30 16:03:31 -07:00
Nathan Froyd b62a707f2b Bug 1209969 - remove prlock.h include from nsBaseHashtable.h; r=erahm
nsBaseHashtable.h doesn't use PRLock.
2015-09-30 00:51:28 -04:00
Jason Orendorff deb2270515 Bug 1054756, part 5 - Remove Class::convert.
--HG--
extra : commitid : 6KCxWrCseSZ
extra : rebase_source : 63f3cd6ec1ade43c732ffd9b661fe6f2dca9eb4b
2015-03-20 16:28:59 -05:00
Phil Ringnalda c096566a7e Back out 6 changesets (bug 1186745) for cpptest failure in runnable_utils_unittest, nrappkit_unittest, test_nr_socket_unittest
Backed out changeset c6142b815de0 (bug 1186745)
Backed out changeset d8f740ef2430 (bug 1186745)
Backed out changeset edc0b56d81fa (bug 1186745)
Backed out changeset 383f8ac033ea (bug 1186745)
Backed out changeset ce960a661987 (bug 1186745)
Backed out changeset 3e9783023fb2 (bug 1186745)

--HG--
extra : rebase_source : 4681d6abaaa927ddb863f944efc87e6c6f6c2e26
2015-09-28 19:05:02 -07:00
Xidorn Quan e26e72c529 Bug 1186745 part 6 - Fix event leak when using NS_DispatchToCurrentThread. r=froydnj
--HG--
extra : source : 839c394ca2362db534c9a12b14be3a9f3f5d6ff5
2015-09-29 09:28:22 +10:00
Xidorn Quan 661f0a0891 Bug 1186745 part 1 - Add LeakRefPtr for pointer leaking by default. r=froydnj
This class can be used instead of raw pointer for a sound leaking-by-default
behavior. Also it could take advantage of move semantic check in the future.

--HG--
extra : source : 3dbd000739dc0ea214a2292e3983469e41e99686
2015-09-29 09:28:22 +10:00
Wes Kocher b19d88b060 Backed out 7 changesets (bug 1206168, bug 1177318, bug 1054756) for hazard build failures CLOSED TREE
Backed out changeset e892727a373a (bug 1206168)
Backed out changeset 6c93d1044b7e (bug 1054756)
Backed out changeset 105433ce195b (bug 1054756)
Backed out changeset 13128a88f2b9 (bug 1054756)
Backed out changeset c250abf4fd17 (bug 1054756)
Backed out changeset fc9fef646a97 (bug 1054756)
Backed out changeset c8897f109a08 (bug 1177318)
2015-09-23 12:31:19 -07:00
Jason Orendorff 54e92d9beb Bug 1054756, part 5 - Remove Class::convert.
--HG--
extra : commitid : KrjkP1flM3c
extra : rebase_source : 8c367e3158528e92ac8ebc51521d32472f1e5bb1
2015-03-20 16:28:59 -05:00
Chris Peterson 71920a9550 Bug 1207030 - Enable -Wshadow flag in more directories that have no -Wshadow warnings. r=glandium 2015-09-22 21:39:03 -07:00
Nicholas Nethercote 647b520991 Bug 1201135 - Rename pldhash.{h,cpp} to PLDHashTable.{h,cpp}. r=mccr8.
--HG--
rename : xpcom/glue/pldhash.cpp => xpcom/glue/PLDHashTable.cpp
rename : xpcom/glue/pldhash.h => xpcom/glue/PLDHashTable.h
extra : rebase_source : 06b9d30db96ed78500fd44d9c0b51609103508a3
2015-09-15 20:49:53 -07:00
Chris Peterson 0dbaae1ce2 Bug 1204403 - Fix -Wshadow warnings in xpcom. r=mccr8 2015-09-07 23:56:16 -07:00