diff --git a/js/src/jscntxtinlines.h b/js/src/jscntxtinlines.h index 1b66dbf8cceb..a9a10ac92db7 100644 --- a/js/src/jscntxtinlines.h +++ b/js/src/jscntxtinlines.h @@ -68,7 +68,7 @@ class CompartmentChecker } 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()); } @@ -100,7 +100,7 @@ class CompartmentChecker } void check(JSString* str) { - MOZ_ASSERT(!str->isMarked(gc::GRAY)); + MOZ_ASSERT(JS::CellIsNotGray(str)); if (str->isAtom()) { checkAtom(str); } else { @@ -161,7 +161,7 @@ class CompartmentChecker } void check(JSScript* script) { - MOZ_ASSERT_IF(script, !script->isMarked(gc::GRAY)); + MOZ_ASSERT(JS::CellIsNotGray(script)); if (script) check(script->compartment()); }