Bug 1637937 - Use MOZ_DIAGNOSTIC_ASSERT in marking code instead of JS_DIAGNOSTICS_ASSERT r=sfink
authorJon Coppeard <jcoppeard@mozilla.com>
Wed, 20 May 2020 21:36:24 +0000
changeset 531406 ad673505fddf51183c6960154274820f44c6c9c4
parent 531405 c4fc711cc7babf3ed3141fc38f85bf76c459bf9a
child 531407 a291f439f35a9a96948de0bc6acc07bbf3a8625c
push id37439
push userbtara@mozilla.com
push dateThu, 21 May 2020 21:49:34 +0000
treeherdermozilla-central@92c11f0bf14b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssfink
bugs1637937
milestone78.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 1637937 - Use MOZ_DIAGNOSTIC_ASSERT in marking code instead of JS_DIAGNOSTICS_ASSERT r=sfink Depends on D76122 Differential Revision: https://phabricator.services.mozilla.com/D76123
js/src/gc/Marking.cpp
--- a/js/src/gc/Marking.cpp
+++ b/js/src/gc/Marking.cpp
@@ -1275,20 +1275,20 @@ inline void js::GCMarker::eagerlyMarkChi
   // added to the delayed marking list. When the function returns, the
   // marking stack is at the same depth as it was on entry. This way we avoid
   // using tags when pushing ropes to the stack as ropes never leak to other
   // users of the stack. This also assumes that a rope can only point to
   // other ropes or linear strings, it cannot refer to GC things of other
   // types.
   gc::MarkStack& stack = currentStack();
   size_t savedPos = stack.position();
-  JS_DIAGNOSTICS_ASSERT(rope->getTraceKind() == JS::TraceKind::String);
+  MOZ_DIAGNOSTIC_ASSERT(rope->getTraceKind() == JS::TraceKind::String);
   while (true) {
-    JS_DIAGNOSTICS_ASSERT(rope->getTraceKind() == JS::TraceKind::String);
-    JS_DIAGNOSTICS_ASSERT(rope->JSString::isRope());
+    MOZ_DIAGNOSTIC_ASSERT(rope->getTraceKind() == JS::TraceKind::String);
+    MOZ_DIAGNOSTIC_ASSERT(rope->JSString::isRope());
     AssertShouldMarkInZone(rope);
     MOZ_ASSERT(rope->isMarkedAny());
     JSRope* next = nullptr;
 
     JSString* right = rope->rightChild();
     if (!right->isPermanentAtom() && mark(right)) {
       if (right->isLinear()) {
         eagerlyMarkChildren(&right->asLinear());