Assert that GC things are only marked on the main thread, bug 815906. r=billm
authorBrian Hackett <bhackett1024@gmail.com>
Tue, 27 Nov 2012 21:07:34 -0800
changeset 114331 6f0c997ba776240b89b5b2aa7bd0f98092f30ffc
parent 114330 8708a2a2276722a66801a0a046827ab0258de622
child 114332 0c242b9fcb54759ed2cbd6f3880dbe91337aa12c
push id23913
push useremorley@mozilla.com
push dateWed, 28 Nov 2012 17:11:31 +0000
treeherdermozilla-central@17c267a881cf [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbillm
bugs815906
milestone20.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Assert that GC things are only marked on the main thread, bug 815906. r=billm
js/src/gc/Marking.cpp
--- a/js/src/gc/Marking.cpp
+++ b/js/src/gc/Marking.cpp
@@ -105,16 +105,20 @@ CheckMarkedThing(JSTracer *trc, T *thing
     JS_ASSERT(thing);
     JS_ASSERT(thing->compartment());
     JS_ASSERT(thing->compartment()->rt == trc->runtime);
     JS_ASSERT_IF(IS_GC_MARKING_TRACER(trc), !thing->compartment()->scheduledForDestruction);
     JS_ASSERT(trc->debugPrinter || trc->debugPrintArg);
 
     DebugOnly<JSRuntime *> rt = trc->runtime;
 
+#ifdef DEBUG
+    rt->assertValidThread();
+#endif
+
     JS_ASSERT_IF(thing->compartment()->requireGCTracer(), IS_GC_MARKING_TRACER(trc));
 
     JS_ASSERT(thing->isAligned());
 
     JS_ASSERT_IF(rt->gcStrictCompartmentChecking,
                  thing->compartment()->isCollecting() ||
                  thing->compartment() == rt->atomsCompartment);