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

679 Коммитов

Автор SHA1 Сообщение Дата
Wes Kocher f378fa54b1 Backed out changeset f8d33a975228 (bug 1295197) for being a possible cause of crashtest assertions CLOSED TREE 2016-08-16 11:22:23 -07:00
Nathan Froyd da3e07b555 Bug 1295197 - use non-null-checked operator new in xpcom/; r=erahm
The standard placement new function is declared to not throw, which
means that, per spec, a null check on its result is required.  There are
a number of places throughout xpcom/ where we know that we are passing
non-null pointers to placement new (and receiving them as a return
value), and we are therefore doing useless work performing these null
checks.

Therefore, we should be using an operator new overload that doesn't
require the null check.  MFBT has just such an overload, so use that.
2016-08-16 17:05:39 -04:00
Alexandre Lissy 0af5b943b6 Bug 1284674 - Remove NUWA r=cyu
MozReview-Commit-ID: GyMRNzOBKw6

--HG--
extra : rebase_source : 293af1cd55f2035ce6a99f4ebf144059c32a2b8f
2016-08-02 14:54:00 +02:00
Jan de Mooij 900af968f3 Bug 1283855 part 28 - Make more GC APIs take JSContext instead of JSRuntime. r=terrence
--HG--
extra : rebase_source : c2d35b5d45cad074b9a9a144bc25ea4a32b8b246
2016-07-07 09:56:09 +02:00
Jan de Mooij 7ec38687c8 Bug 1283855 part 27 - Make more GC APIs take JSContext instead of JSRuntime. r=jonco
--HG--
extra : rebase_source : b666bd88d0247b58f7311f81e5116199779cc806
2016-07-07 09:55:45 +02:00
Jan de Mooij 1ffe7cc891 Bug 1283855 part 26 - Make more GC APIs take JSContext instead of JSRuntime. r=terrence,mccr8
--HG--
extra : rebase_source : 68e6c63b179094f2441f01df58e0bdd68620ed09
2016-07-07 09:55:41 +02:00
Andrew McCreight a9c0939624 Bug 1278796, part 5 - Move InitNextPointers into the PurpleBlock ctor. r=smaug
This makes sure that it will always happen, and should placate static
analyses.
2016-06-10 09:17:58 -07:00
Andrew McCreight 4877f53ebf Bug 1278796, part 4 - Move InitNextPointers out of InitBlocks. r=smaug
This clears the way for the next patch.
2016-06-10 09:17:58 -07:00
Andrew McCreight 21a0cf7d40 Bug 1278796, part 3 - Inline StartBlock. r=smaug
This method doesn't do much, and in a later patch it will do even
less.
2016-06-10 09:17:57 -07:00
Andrew McCreight 6e83659330 Bug 1278796, part 2 - Initialize PurpleBlock next pointers in a method. r=smaug 2016-06-10 09:17:57 -07:00
Andrew McCreight c1b7175950 Bug 1278796, part 1 - Inline |entries| in StartBlock. r=smaug
It is used inconsistently, which is confusing. A later patch will move
these into a PurpleBlock method, so the length shouldn't be an issue.
2016-06-10 09:17:57 -07:00
Nicholas Nethercote a6bf1a62c2 Bug 1276837 (part 2) - Rename the CC Block structs. r=mccr8.
nsCycleCollector.cpp has three different structs named "Block", which makes it
hard to read. This patch renames them as EdgeBlock, NodeBlock, and PurpleBlock.

--HG--
extra : rebase_source : cae17ba925559b625f65a4741ae0bb4bee99d078
2016-06-01 09:18:33 +10:00
Nicholas Nethercote 9fe123f601 Bug 1276837 (part 1) - Shrink NodePool::Block. r=mccr8.
15% of our "small" OOM crashes are allocations of this struct. Halving its size
will hopefully help reduce that.

--HG--
extra : rebase_source : 5480a540a9584899def045c1401a5aa9a271d72c
2016-06-01 09:13:21 +10:00
Andrew McCreight cf1d25b060 Bug 1271848, part 2 - Annotate invalid refcount crashes with CC participant information. r=smaug 2016-05-12 10:54:33 -07:00
Eric Rahm c41c5394be Bug 1268215 - Make CCGraphBuilder::AddNode fallible. r=mccr8 2016-05-05 13:54:18 -07:00
Shu-yu Guo d1f542f8c9 Bug 1268805 - Implement PrivateGCThingValue. (r=terrence) 2016-04-29 18:10:07 -07:00
Sebastian Hengst 670924b38b Backed out 2 changesets (bug 1268805) for build bustage. r=backout on a CLOSED TREE
Backed out changeset b8a517eb7c6b (bug 1268805)
Backed out changeset 31075a760b2e (bug 1268805)
2016-04-30 00:52:59 +02:00
Shu-yu Guo e841ff15ad Bug 1268805 - Implement PrivateGCThingValue. (r=terrence) 2016-04-29 15:12:13 -07:00
Kyle Huey 2709afd167 Bug 1263311: Part 3 - s/nsCancelableRunnable/CancelableRunnable/g. r=froydnj 2016-04-11 11:40:06 -07:00
Wes Kocher 7d2cebe912 Backed out 3 changesets (bug 1263311) for Windows build failures in ServiceWorkerPrivate.cpp CLOSED TREE
Backed out changeset 0434a548e1fe (bug 1263311)
Backed out changeset 60b1be29446c (bug 1263311)
Backed out changeset 18132498bc40 (bug 1263311)

MozReview-Commit-ID: LPEa05QobdQ
2016-04-11 12:50:56 -07:00
Kyle Huey d200ed89d0 Bug 1263311: Part 3 - s/nsCancelableRunnable/CancelableRunnable/g. r=froydnj 2016-04-11 11:40:06 -07:00
Nicholas Nethercote a2f068b2ad Bug 1253085 - Remove the |PLDHashTable*| argument from PLDHash{HashKey,MatchEntry}. r=froydnj.
This is easy because it's never needed.

--HG--
extra : rebase_source : 78830dab41c40a1544fa55fc69ca9c1c6709d767
2016-03-16 15:33:44 +11:00
Peter Van der Beken 77f7208a3f Bug 1255223 - Null crash when logging weak maps. r=mccr8.
--HG--
extra : rebase_source : f8c8d9bf095d80b0de0c7af9377c923b7fbb3708
2016-03-04 23:11:37 +01:00
Jonathan Watt 6691a673f4 Bug 1253094, part 9 - Stop using DebugOnly for class/struct members in xpcom/. r=froydnj
MozReview-Commit-ID: ACYMR37DGU9
2016-02-26 15:52:08 +00:00
Bogdan Postelnicu e4d1a83ade Bug 1250134 - assert mJSRuntime when IsGrayJS() is true. r=mccr8
MozReview-Commit-ID: B5046aj61jx

--HG--
extra : rebase_source : 7ddc7be40030dec122643cae4d1042fe611efc2d
2016-02-23 09:28:52 +02:00
Olli Pettay cd9e373713 Bug 1249451 - nsCycleCollector::ScanRoots may cause some unexpected purple buffer usage, r=mccr8
--HG--
extra : rebase_source : e9138c0e1c8861847af2cb8c44800973c1c9ee0d
2016-02-19 20:17:25 +02:00
Carsten "Tomcat" Book 0ed07869c5 Backed out changeset dc704cb50a24 (bug 1249451) for bustage 2016-02-19 14:18:37 +01:00
Olli Pettay 27f059ed50 Bug 1249451 - nsCycleCollector::ScanRoots may cause some unexpected purple buffer usage, r=mccr8
--HG--
extra : rebase_source : ed241e50718cab2717d9ed42f2c46cdfa63a9d6a
2016-02-19 13:09:20 +02:00
Andrew McCreight 8705772a81 Bug 1052793, part 1 - Do per-zone GC for CC_WAITING triggers. r=smaug 2016-02-18 15:21:48 -08:00
Chris Pearce b3256c287c Bug 1200514 - Run remaining stable state runnables after final cycle collection. r=froydnj,mccr8
--HG--
extra : amend_source : 877c598157dcef100cc139cbc62cde670f9ce16a
2016-01-13 11:37:57 +13:00
Tom Tromey 5412728905 Bug 757969 - use __thread in ThreadLocal; r=froydnj 2016-01-22 10:33:44 -07:00
Nicholas Nethercote 5a752050c8 Bug 1237169 (follow-up) - Fix static analysis bustage. r=me. 2016-01-06 15:31:46 -08:00
Nicholas Nethercote 3074545c18 Bug 1237169 - Remove some unused parameters in and around xpcom/base/. r=mccr8.
--HG--
extra : rebase_source : a3fd151aaecc1a21d14d51ce85c25413a6c3df5f
2016-01-05 19:32:28 -08:00
Olli Pettay 5ca565690e Bug 1120016 - Allocate short lived JS wrappers in the Nursery, r=mccr8,terrence 2015-12-31 15:21:49 +02:00
Wes Kocher 792ca14825 Backed out changeset 0d55a6e4e98e (bug 1120016) for 980 b2g hazards
--HG--
extra : commitid : 27OIHVsa17S
2015-12-30 16:34:18 -08:00
Olli Pettay 2066f6d7b3 Bug 1120016 - Allocate short lived JS wrappers in the Nursery, r=mccr8,terrence
--HG--
extra : rebase_source : 3d51b7fc9962a93eb6071328db84b5b327225246
2015-12-30 19:16:13 +02:00
Nick Fitzgerald b8340cdc7c Bug 1225618 - Do not capture stacks for cycle collection timeline markers; r=vporof 2015-11-23 16:50:56 +01: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
Andrew McCreight d4e3c0e2c4 Bug 1208157, part 2 - Make the fields of nsCycleCollector private. r=smaug
These are accidentally exposed by the NS_DECL.
2015-09-25 10:43:21 -07:00
Andrew McCreight f288f83204 Bug 1208157, part 1 - Add and use nsCycleCollector::IsIdle() predicate. r=smaug 2015-09-25 10:43:21 -07:00
Andrew McCreight adf56106da Bug 1202670 - Move most of nsCycleCollector::RemoveObjectFromGraph into CCGraph. r=smaug 2015-09-25 10:43:21 -07:00
Mike Hommey 538706caba Bug 1203840 - Trigger dirty pages purge after CC. r=njn,r=smaug,r=mccr8
Jemalloc 4 purges dirty pages regularly during free() when the ratio of dirty
pages compared to active pages is higher than 1 << lg_dirty_mult.  We set
lg_dirty_mult in jemalloc_config to limit RSS usage, but it also has an impact
on performance.

So instead of enforcing a high ratio to force more pages being purged, we keep
jemalloc's default ratio of 8, and force a regular purge of all dirty pages,
after cycle collection.

Keeping jemalloc's default ratio avoids cycle-collection-triggered purge to
have to go through really all dirty pages when there are a lot, in which case
the normal jemalloc purge during free() will already have kicked in. It also
takes care of everything that doesn't run the cycle collector still having
a level of purge, like plugins in the plugin-container.

At the same time, since jemalloc_purge_freed_pages does nothing with jemalloc 4,
repurpose the MEMORY_FREE_PURGED_PAGES_MS telemetry probe to track the time
spent in this cycle-collector-triggered purge.
2015-09-20 17:43:43 +09:00
Andrew McCreight ac5e9c32f9 Bug 1205348 - Always do shutdown CCs when NS_FREE_PERMANENT_DATA is defined. r=smaug 2015-09-16 10:10:00 +02:00
Nicholas Nethercote 2ee4fd783b Bug 1121760 (part 6) - Move all remaining PL_DHash*() functions into PLDHashTable. r=poiru.
--HG--
extra : rebase_source : 3cdc975507170d783b02d70f7c7d95c6bf2e1bcd
2015-09-14 14:23:47 -07:00
Nicholas Nethercote 479244f7c9 Bug 1121760 (part 2) - Remove PL_DHashTableAdd(). r=poiru.
--HG--
extra : rebase_source : 41eb939bfb5c925cba58b1af57abce9a4e5fdb30
2015-09-14 14:23:12 -07:00
Nicholas Nethercote fcfdd8f54b Bug 1121760 (part 1) - Remove PL_DHashTableSearch(). r=poiru.
--HG--
extra : rebase_source : 770e1f49a451ecbadd778e071b204611e27cf701
2015-05-21 00:34:25 -07:00
Nicholas Nethercote ffb1fefc9f Bug 1202526 (part 8) - Use PLDHashTable::RemoveEntry() in the cycle collector. r=mccr8.
This avoids repeating the hash table search in order to remove a CC graph
entry, which is good because it's a common operation.
2015-09-07 21:15:32 -07:00
Andrew McCreight e46abbfe4f Bug 1200795, part 2 - Add memory reporting for CCGraph::mPtrToNodeMap. r=njn 2015-09-04 09:45:44 -07:00
Andrew McCreight bd863a70b2 Bug 1200795, part 1 - Eliminate excessive detail from cycle collector graph memory reporting. r=njn 2015-09-04 09:45:44 -07:00
Terrence Cole 2c05aff66d Bug 1193032 - Part 2: Make unlimited SliceBudget initialization explicit; r=ehoogeveen,r=mccr8 2015-08-11 08:42:24 -07:00
Andrew McCreight 3127d66102 Bug 1189122 - Assert when we Suspect() when a CC scan is in progress. r=smaug
This can cause leaks that are invisible to our XPCOM leak detection system.

To avoid this, classes should not addref or release in their Traverse methods.

--HG--
extra : rebase_source : acd0b070c63cbb4111c165d6b131b8e3b822773a
2015-07-29 20:48:00 +02:00
Nicholas Nethercote 87b80f8c66 Bug 1188745 - Rename nsTArray::SizeOfExcludingThis() as ShallowSizeOfExcludingThis(). r=froydnj.
This makes it clearer that, unlike how SizeOf*() functions usually work, this
doesn't measure any children hanging off the array.

And do likewise for nsTObserverArray.

--HG--
extra : rebase_source : 6a8c8d8ffb53ad51b5773afea77126cdd767f149
2015-07-28 23:24:24 -07:00
Victor Porof f11ae1a898 Bug 1183228 - Use separate files for AutoTimelineMarker and AutoGlobalTimelineMarker, r=smaug 2015-07-17 15:51:39 -04:00
Nick Fitzgerald 6e561802a9 Bug 1141614 - Part 3: Trace cycle collection with AutoGlobalTimelineMarker; r=smaug 2015-06-10 14:05:53 -07:00
Ryan VanderMeulen 9a2838c071 Backed out 5 changesets (bug 1141614) for browser_timelineMarkers-02.js failures.
Backed out changeset 1db2b848699a (bug 1141614)
Backed out changeset 9becec7879dc (bug 1141614)
Backed out changeset fff492fc48ce (bug 1141614)
Backed out changeset f49e64db4a66 (bug 1141614)
Backed out changeset 63199013dac2 (bug 1141614)

CLOSED TREE
2015-06-09 13:20:24 -04:00
Nick Fitzgerald 5e7b98846a Bug 1141614 - Part 3: Trace cycle collection with AutoGlobalTimelineMarker; r=smaug 2015-06-08 12:40:07 -07:00
Andrew McCreight fd7c27805c Bug 1163006, part 5 - Add a less COM-y getter for mWantAllTraces. r=smaug 2015-06-04 14:41:31 -07:00
Andrew McCreight 7d7ee5c55a Bug 1163006, part 4 - De-COM the nsICycleCollectorListener methods we only call from C++. r=smaug 2015-06-04 14:41:31 -07:00
Andrew McCreight 36211f1f19 Bug 1163006, part 3 - Clean up some cycle collector logger set up code. r=smaug
There's no need for the local variable.
2015-06-04 14:41:31 -07:00
Andrew McCreight 3867e1724e Bug 1163006, part 2 - Rename various cycle collector listener variables to logger. r=smaug 2015-06-04 14:41:31 -07:00
Andrew McCreight 0172a9ac44 Bug 1163006, part 1 - Make the cycle collector use the concrete logger class. r=smaug
This patch makes it so that while the cycle collector is running methods are called
on the concrete implementation nsCycleCollectorLogger, rather than the interface
nsICycleCollectorListener. This makes explicit the requirement that we have to be
very careful about what we call during the cycle collector, and should make it
possible for the GC rooting static analysis to understand what is happening.

The UUID of nsICycleCollectorHandler was changed to appease the UUID commit hook.
2015-06-04 14:41:31 -07:00
Nicholas Nethercote e849e6588b Bug 1170416 (part 3) - Remove the PLDHashTable2 typedef. r=froydnj.
--HG--
extra : rebase_source : 9510ea47204fffa163cac43aeaaac6ae1ad80419
2015-05-19 16:46:17 -07:00
Terrence Cole c16fb495f0 Bug 1169791 - Strongly type GetTenuredGCThingZone; r=jonco, r=mccr8
--HG--
extra : rebase_source : bedbbb99eb9655dc3f4079e0d3e5a376f7b83764
2015-06-01 14:11:08 -07:00
Terrence Cole b9e2a85661 Bug 1169791 - Strongly type MergeZone; r=mccr8
--HG--
extra : rebase_source : 2176d9095b855489984af1a5310826190a4ad06e
2015-06-01 14:11:06 -07:00
Terrence Cole 760b29c216 Bug 1169791 - Strongly type NoteJSRoot; r=mccr8
--HG--
extra : rebase_source : 44b4b6ecb67677caf3180b353fc828c972d4e1f9
2015-05-29 12:57:23 -07:00
Nicholas Nethercote a84d4cd609 Bug 1168007 (part 8) - Use PLDHashTable2 in nsCycleCollector. r=froydnj.
--HG--
extra : rebase_source : f4781bc96a7cb7317cfd111014f42fb903c5dce2
2015-05-18 21:29:58 -07:00
Terrence Cole c01ef51c2d Bug 1167453 - Rename JSGCTraceKind and make it a C++11 enum class; r=jonco
--HG--
extra : rebase_source : 7dbeee0826fa20477ed227c9d336fdfe6de6ffd2
2015-05-22 10:40:24 -07:00
Andrew McCreight 807426185a Bug 1164587 - Get rid of Fault() in the cycle collector. r=smaug 2015-05-15 10:33:09 -07:00
Andrew McCreight 2d929a5569 Bug 1158558, part 2 - Finish incremental GCs in progress in BeginCollection() and ShutdownCollect(). r=smaug
Various parts of the first half of BeginCollection() can start an incremental GC.
This is bad because running the GC and CC at the same time can cause the CC to end
up with pointers to dead JS objects.

To avoid this, we finish any incremental GC in progress in BeginCollection. This
is slow, but hopefully it is rare.
2015-05-15 10:33:09 -07:00
Andrew McCreight d68c95b07b Bug 1158558, part 1 - Expand time logging in BeginCollection. r=smaug 2015-05-15 10:33:09 -07:00
Andrew McCreight 454420c018 Bug 1163657 - Clean up setting of mFlags in CCGraphBuilder's ctor. r=smaug 2015-05-15 10:33:08 -07:00
Andrew McCreight ff3b670628 Bug 866681, part 2 - Make ContentUnbinder use DeferredFinalize. r=smaug 2015-05-13 12:48:52 -07:00
Andrew McCreight c660ffa34b Bug 866681, part 1 - Track if any slice of CC was manually triggered. r=smaug 2015-05-13 12:48:52 -07:00
Mike Hommey 924c9eb636 Bug 1134923 - Remove NS_Alloc/NS_Realloc/NS_Free. r=nfroyd
They are kept around for the sake of the standalone glue, which is used
for e.g. webapprt, which doesn't have direct access to jemalloc, and thus
still needs a wrapper to go through the xpcom function list and get to
jemalloc from there.
2015-05-01 09:40:30 +09:00
Andrew McCreight 0dc13cb4a3 Bug 1152505 - CCGraphBuilder::NoteChild should pass aEdgeName by reference. r=smaug 2015-04-09 13:56:00 -04:00
Andrew McCreight 315f9bb7d2 Bug 1144649 - Make CCGraph::AddNodeToMap fallible again. r=smaug
Crashing here is apparently fairly common. This restores the old behavior, so we at least
don't crash immediately, but instead enter a slow downward spiral of leaking.

This improves on the old behavior in that we only try and fail to grow the hash table once,
rather than on every add.  khuey I think reported that the browser got very slow, because
you are going through the very slowest path of the allocator over and over.
2015-04-09 16:00:00 -04: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
Andrew McCreight 468e063778 Bug 1137536, part 3 - Move the top level DeferredFinalize functions into their own file. r=smaug 2015-03-18 11:36:03 -07:00
Andrew McCreight fc0fb081b0 Bug 1137536, part 1 - Move DeferredFinalize out of the cyclecollector namespace. r=smaug 2015-03-18 11:36:03 -07:00
Andrew McCreight def1230d4e Bug 1119482, part 4 - Move IsJSHolder into HoldDropJSObjects. r=smaug 2015-03-10 16:41:38 -07:00
Andrew McCreight 2cf438367a Bug 1119482, part 3 - Move the Hold and DropJSObjects implementations to a new HoldDropJSObjects.cpp file. r=smaug 2015-03-10 16:41:38 -07:00
Andrew McCreight a5fe5ce48e Bug 1119482, part 1 - Use CycleCollectedJSRuntime::Get() in the various CC wrapper methods. r=smaug
It is a little cleaner to use this helper method if we only care about the CCJSRuntime pointer,
and it will let us move some of these methods out of this file more easily.
2015-03-10 16:41:38 -07:00
Andrew McCreight e4d15a45bb Bug 1135773 - Initialize QI return values to null in the cycle collector. r=smaug 2015-02-25 09:44:10 -08:00
Nicholas Nethercote fa624bca8a Bug 1131901 (part 2) - Make CCGraphBuilder::AddNode() infallible. r=mccr8.
--HG--
extra : rebase_source : cfbef5e7c783c1abb1e9bb69dcc5ef14d3c96369
2015-02-02 23:58:42 -08:00
Nicholas Nethercote 3a7b0a9f57 Bug 1131901 (part 1) - Make PL_DHashTableAdd() infallible by default, and add a fallible alternative. r=froydnj.
I kept all the existing PL_DHashTableAdd() calls fallible, in order to be
conservative, except for the ones in nsAtomTable.cpp which already were
followed immediately by an abort on failure.

--HG--
extra : rebase_source : 526d96ab65e4d7d71197b90d086d19fbdd79b7b5
2015-02-02 14:48:58 -08:00
Nicholas Nethercote 63e3218e4c Back out changesets 2fcef6b54be7, 2be07829fefc, 66dfe37b8532, df3fcd2be8fd, 0a436bce77a6 (bug 1050035) for causing intermittent crashes and assertion failures.
--HG--
extra : rebase_source : eb30be83c3143c6c203585a80a18f180025efaba
2015-02-10 14:39:49 -08: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
Nicholas Nethercote 66223ceeb0 Bug 1050035 (part 5) - Make CCGraphBuilder::AddNode() infallible. r=mccr8.
--HG--
extra : rebase_source : 4ebe842e419f8b887b9e9b98f97c17fe103039bc
2015-02-02 23:58:42 -08:00
Nicholas Nethercote b5913e0b3d Bug 1050035 (part 4) - Make PL_DHashTableAdd() infallible by default, and add a fallible alternative. r=froydnj.
I kept all the existing PL_DHashTableAdd() calls fallible, in order to be
conservative, except for the ones in nsAtomTable.cpp which already were
followed immediately by an abort on failure.

--HG--
extra : rebase_source : eeba14d732077ef2e412f4caca852de6b6b85f55
2015-02-02 14:48:58 -08:00
Mike Hommey a35dbaeebf Bug 1126593 - Add a global fallible instance, so that using fallible works directly, everywhere. r=njn
--HG--
rename : memory/mozalloc/fallible.h => memory/fallible/fallible.h
2015-02-02 09:56:13 +09:00
Nicholas Nethercote 3163cfc2c1 Bug 1124973 (part 2) - Introduce PL_DHashTableSearch(), and replace most PL_DHashTableLookup() calls with it. r=froydnj.
It feels safer to use a function with a new name, rather than just changing the
behaviour of the existing function.

For most of these cases the PL_DHashTableLookup() result was checked with
PL_DHASH_ENTRY_IS_{FREE,BUSY} so the conversion was easy. A few of them
preceded that check with a useless null check, but the intent of these was
still easy to determine.

I'll do the trickier ones in subsequent patches.

--HG--
extra : rebase_source : ab37a7a30be563861ded8631771181aacf054fd4
2015-01-22 21:06:55 -08:00
Andrew McCreight c9ef92b837 Bug 1120495 - Don't assert if FinishAnyCurrentCollection reenters during CleanupPhase. r=smaug 2015-01-21 14:35:54 -08:00
Nicholas Nethercote 8bd1f6f072 Bug 1123151 (part 2) - Add PLDHashTable::IsInitialized(). r=froydnj.
This encapsulates most of the uses of PLDHashTable::ops.

--HG--
extra : rebase_source : 7760ce8e46a37e87dcfe590e809a21df01fe510f
2015-01-19 16:11:34 -08:00
Nicholas Nethercote bd573c9b9c Bug 1123151 (part 1) - Set PLDHashTable::ops consistently. r=froydnj.
Currently the setting of PLDHashTable::ops is very haphazard.

- PLDHashTable has no constructor, so it's not auto-nulled, so lots of places
  null it themselves.

- In the fallible PLDHashTable::Init() function, if the entry storage
  allocation fails we'll be left with a table that has |ops| set -- indicating
  it's been initialized -- but has null entry storage. I'm not certain this can
  cause problems but it feels unsafe, and some (but not all) callers of Init()
  null it on failure.

- PLDHashTable does not null |ops| in Finish(), so some (but not all) callers
  do this themselves.

This patch makes things simpler.

- It adds a constructor that zeroes |ops|.

- It modifies Init() so that it only sets |ops| once success is ensured.

- It zeroes |ops| in Finish().

- Finally, it removes all the now-unnecessary |ops| nulling done by the users
  of PLDHashTable.

--HG--
extra : rebase_source : bb34979c218d152562a2f9c7e5215256c111cc5b
2015-01-19 16:01:24 -08:00
Ehsan Akhgari aa32fa615f Bug 1123110 - Clarify the ownership of several cycle collector members; r=mccr8 2015-01-18 18:43:02 -05:00
Nicholas Nethercote 69fe655b04 Bug 1121304 (part 2, attempt 2) - Remove PLDHashTableOps::{alloc,free}Table. r=froydnj.
--HG--
extra : rebase_source : bc119bd0d3b6944e8c5a000950e0c4052cb70aef
2015-01-14 14:35:56 -08:00
Phil Ringnalda e39f0adeca Backed out 2 changesets (bug 1121304) for consistent b2g hangs in webgl-color-test.html?frame=1&__&preserve&premult&_____
Backed out changeset 20651ac19549 (bug 1121304)
Backed out changeset 758afec77c95 (bug 1121304)
2015-01-14 22:02:23 -08:00
Nicholas Nethercote e9735966fa Bug 1121304 (part 2) - Remove PLDHashTableOps::{alloc,free}Table. r=froydnj. 2015-01-14 14:35:56 -08:00