Bug 1162622 - Check fewer traced things as it's too slow to check all edges; r=sfink
authorTerrence Cole <terrence@mozilla.com>
Tue, 12 May 2015 17:50:56 -0700
changeset 266194 9f9797766a5dbaed68e536982bfacf1c25979b53
parent 266193 2661dabba07444905c2b56b9c0891a47a7edcb37
child 266195 d4886d807eb21b9ff275958a1239aa6d8b9ffe37
push id2231
push usermichael.l.comella@gmail.com
push dateFri, 22 May 2015 20:04:59 +0000
reviewerssfink
bugs1162622
milestone41.0a1
Bug 1162622 - Check fewer traced things as it's too slow to check all edges; r=sfink
js/src/gc/Marking.cpp
--- a/js/src/gc/Marking.cpp
+++ b/js/src/gc/Marking.cpp
@@ -651,16 +651,17 @@ MustSkipMarking<JS::Symbol*>(JS::Symbol*
 template <typename T>
 void
 DoMarking(GCMarker* gcmarker, T thing)
 {
     // Do per-type marking precondition checks.
     if (MustSkipMarking(thing))
         return;
 
+    CheckTracedThing(gcmarker, thing);
     gcmarker->traverse(thing);
 
     // Mark the compartment as live.
     SetMaybeAliveFlag(thing);
 }
 
 template <typename S>
 struct DoMarkingFunctor : public VoidDefaultAdaptor<S> {
@@ -783,17 +784,16 @@ js::GCMarker::traverseEdge(S source, Val
 {
     DispatchValueTyped(TraverseEdgeFunctor<Value, S>(), v, this, source);
 }
 
 template <typename T>
 bool
 js::GCMarker::mark(T* thing)
 {
-    CheckTracedThing(this, thing);
     AssertZoneIsMarking(thing);
     MOZ_ASSERT(!IsInsideNursery(gc::TenuredCell::fromPointer(thing)));
     return gc::ParticipatesInCC<T>::value
            ? gc::TenuredCell::fromPointer(thing)->markIfUnmarked(markColor())
            : gc::TenuredCell::fromPointer(thing)->markIfUnmarked(gc::BLACK);
 }