Bug 1338623 - Use IsNotGray in all gray marking assertions r=sfink
authorJon Coppeard <jcoppeard@mozilla.com>
Fri, 03 Mar 2017 10:45:47 +0000
changeset 394784 237caed7236d209f45b39dc1e5ab12692087ea51
parent 394783 1402d02dd61e0f69c00da5a765d6083a627d35eb
child 394785 ed21480d66e66fb04b09cd0eeba991e179fc7928
push id1468
push userasasaki@mozilla.com
push dateMon, 05 Jun 2017 19:31:07 +0000
treeherdermozilla-release@0641fc6ee9d1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssfink
bugs1338623
milestone54.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
Bug 1338623 - Use IsNotGray in all gray marking assertions r=sfink
js/src/jscntxtinlines.h
--- a/js/src/jscntxtinlines.h
+++ b/js/src/jscntxtinlines.h
@@ -63,17 +63,17 @@ class CompartmentChecker
     }
 
     void checkZone(JS::Zone* z) {
         if (compartment && z != compartment->zone())
             fail(compartment->zone(), z);
     }
 
     void check(JSObject* obj) {
-        MOZ_ASSERT_IF(obj, IsInsideNursery(obj) || !obj->asTenured().isMarked(gc::GRAY));
+        MOZ_ASSERT(JS::ObjectIsNotGray(obj));
         if (obj)
             check(obj->compartment());
     }
 
     template<typename T>
     void check(const Rooted<T>& rooted) {
         check(rooted.get());
     }
@@ -95,17 +95,17 @@ class CompartmentChecker
         if (compartment) {
             JSRuntime* rt = compartment->runtimeFromAnyThread();
             MOZ_ASSERT(rt->gc.atomMarking.atomIsMarked(compartment->zone(), cell));
         }
 #endif
     }
 
     void check(JSString* str) {
-        MOZ_ASSERT(!str->isMarked(gc::GRAY));
+        MOZ_ASSERT(JS::CellIsNotGray(str));
         if (str->isAtom()) {
             checkAtom(str);
         } else {
             checkZone(str->zone());
         }
     }
 
     void check(JS::Symbol* symbol) {
@@ -156,17 +156,17 @@ class CompartmentChecker
     }
 
     void check(jsid id) {
         if (JSID_IS_GCTHING(id))
             checkAtom(JSID_TO_GCTHING(id).asCell());
     }
 
     void check(JSScript* script) {
-        MOZ_ASSERT_IF(script, !script->isMarked(gc::GRAY));
+        MOZ_ASSERT(JS::CellIsNotGray(script));
         if (script)
             check(script->compartment());
     }
 
     void check(InterpreterFrame* fp);
     void check(AbstractFramePtr frame);
     void check(SavedStacks* stacks);