Bug 1442599 - Part 4: Replace JS_ALWAYS_TRUE/FALSE with MOZ_ALWAYS_TRUE/FALSE. r=jorendorff
authorAndré Bargull <andre.bargull@gmail.com>
Thu, 15 Mar 2018 03:42:56 -0700
changeset 461845 2269c7ed37ff9f28bf8bbd4c97b886e52fadaf2c
parent 461844 12150eddce352b3cdc6473114e52035025cfa3ce
child 461846 43b8be56fa0621bfc2ece22a1981afc25bae8ee2
push id9165
push userasasaki@mozilla.com
push dateThu, 26 Apr 2018 21:04:54 +0000
treeherdermozilla-beta@064c3804de2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjorendorff
bugs1442599
milestone61.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 1442599 - Part 4: Replace JS_ALWAYS_TRUE/FALSE with MOZ_ALWAYS_TRUE/FALSE. r=jorendorff
js/public/Result.h
js/src/builtin/Array.cpp
js/src/builtin/TypedObject.cpp
js/src/frontend/Parser.cpp
js/src/jit/IonBuilder.cpp
js/src/jit/MIR.h
js/src/jsutil.h
js/src/vm/Interpreter.cpp
js/src/vm/JSAtom.cpp
js/src/vm/JSObject.cpp
js/src/vm/NativeObject-inl.h
js/src/vm/Shape.cpp
js/src/vm/TypeInference.cpp
js/src/vm/UnboxedObject.cpp
js/src/wasm/AsmJS.cpp
--- a/js/public/Result.h
+++ b/js/public/Result.h
@@ -146,34 +146,34 @@
 /**
  * Like JS_TRY_OR_RETURN_FALSE, but returning nullptr on error,
  * rather than false.
  */
 #define JS_TRY_OR_RETURN_NULL(cx, expr) \
     do { \
         auto tmpResult_ = (expr); \
         if (tmpResult_.isErr()) { \
-            JS_ALWAYS_FALSE((cx)->resultToBool(tmpResult_)); \
+            MOZ_ALWAYS_FALSE((cx)->resultToBool(tmpResult_)); \
             return nullptr; \
         } \
     } while (0)
 
 #define JS_TRY_VAR_OR_RETURN_FALSE(cx, target, expr) \
     do { \
         auto tmpResult_ = (expr); \
         if (tmpResult_.isErr()) \
             return (cx)->resultToBool(tmpResult_); \
         (target) = tmpResult_.unwrap(); \
     } while (0)
 
 #define JS_TRY_VAR_OR_RETURN_NULL(cx, target, expr) \
     do { \
         auto tmpResult_ = (expr); \
         if (tmpResult_.isErr()) {  \
-            JS_ALWAYS_FALSE((cx)->resultToBool(tmpResult_)); \
+            MOZ_ALWAYS_FALSE((cx)->resultToBool(tmpResult_)); \
             return nullptr; \
         } \
         (target) = tmpResult_.unwrap(); \
     } while (0)
 
 namespace JS {
 
 using mozilla::Ok;
--- a/js/src/builtin/Array.cpp
+++ b/js/src/builtin/Array.cpp
@@ -2202,32 +2202,32 @@ js::intrinsic_ArrayNativeSort(JSContext*
 
         /* Here len == n + undefs + number_of_holes. */
         if (comp == Match_None) {
             /*
              * Sort using the default comparator converting all elements to
              * strings.
              */
             if (allStrings) {
-                JS_ALWAYS_TRUE(vec.resize(n * 2));
+                MOZ_ALWAYS_TRUE(vec.resize(n * 2));
                 if (!MergeSort(vec.begin(), n, vec.begin() + n, SortComparatorStrings(cx)))
                     return false;
             } else if (allInts) {
-                JS_ALWAYS_TRUE(vec.resize(n * 2));
+                MOZ_ALWAYS_TRUE(vec.resize(n * 2));
                 if (!MergeSort(vec.begin(), n, vec.begin() + n,
                                SortComparatorLexicographicInt32())) {
                     return false;
                 }
             } else {
                 if (!SortLexicographically(cx, &vec, n))
                     return false;
             }
         } else {
             if (allInts) {
-                JS_ALWAYS_TRUE(vec.resize(n * 2));
+                MOZ_ALWAYS_TRUE(vec.resize(n * 2));
                 if (!MergeSort(vec.begin(), n, vec.begin() + n, SortComparatorInt32s[comp]))
                     return false;
             } else {
                 if (!SortNumerically(cx, &vec, n, comp))
                     return false;
             }
         }
 
--- a/js/src/builtin/TypedObject.cpp
+++ b/js/src/builtin/TypedObject.cpp
@@ -2179,17 +2179,17 @@ InlineTransparentTypedObject::getOrCreat
     if (!buffer)
         return nullptr;
 
     // The owning object must always be the array buffer's first view. This
     // both prevents the memory from disappearing out from under the buffer
     // (the first view is held strongly by the buffer) and is used by the
     // buffer marking code to detect whether its data pointer needs to be
     // relocated.
-    JS_ALWAYS_TRUE(buffer->addView(cx, this));
+    MOZ_ALWAYS_TRUE(buffer->addView(cx, this));
 
     buffer->setForInlineTypedObject();
     buffer->setHasTypedObjectViews();
 
     if (!table->add(cx, this, buffer))
         return nullptr;
 
     if (IsInsideNursery(this)) {
--- a/js/src/frontend/Parser.cpp
+++ b/js/src/frontend/Parser.cpp
@@ -4046,17 +4046,17 @@ bool
 Parser<SyntaxParseHandler, CharT>::asmJS(Node list)
 {
     // While asm.js could technically be validated and compiled during syntax
     // parsing, we have no guarantee that some later JS wouldn't abort the
     // syntax parse and cause us to re-parse (and re-compile) the asm.js module.
     // For simplicity, unconditionally abort the syntax parse when "use asm" is
     // encountered so that asm.js is always validated/compiled exactly once
     // during a full parse.
-    JS_ALWAYS_FALSE(abortIfSyntaxParser());
+    MOZ_ALWAYS_FALSE(abortIfSyntaxParser());
 
     // Record that the current script source constains some AsmJS, to disable
     // any incremental encoder, as AsmJS cannot be encoded with XDR at the
     // moment.
     if (ss)
         ss->setContainsAsmJS();
     return false;
 }
--- a/js/src/jit/IonBuilder.cpp
+++ b/js/src/jit/IonBuilder.cpp
@@ -10031,17 +10031,17 @@ IonBuilder::freezePropertiesForCommonPro
             continue;
 
         TypeSet::ObjectKey* key = types->getObject(i);
         if (!key)
             continue;
 
         while (true) {
             HeapTypeSetKey property = key->property(NameToId(name));
-            JS_ALWAYS_TRUE(!property.isOwnProperty(constraints(), allowEmptyTypesforGlobal));
+            MOZ_ALWAYS_TRUE(!property.isOwnProperty(constraints(), allowEmptyTypesforGlobal));
 
             // Don't mark the proto. It will be held down by the shape
             // guard. This allows us to use properties found on prototypes
             // with properties unknown to TI.
             if (key->proto() == TaggedProto(foundProto))
                 break;
             key = TypeSet::ObjectKey::get(key->proto().toObjectOrNull());
         }
--- a/js/src/jit/MIR.h
+++ b/js/src/jit/MIR.h
@@ -120,17 +120,17 @@ bool MaybeSimdTypeToMIRType(SimdType typ
 // Convert a SimdType to the corresponding MIRType, or crash.
 //
 // Note that this is not an injective mapping: SimdType has signed and unsigned
 // integer types that map to the same MIRType.
 static inline
 MIRType SimdTypeToMIRType(SimdType type)
 {
     MIRType ret = MIRType::None;
-    JS_ALWAYS_TRUE(MaybeSimdTypeToMIRType(type, &ret));
+    MOZ_ALWAYS_TRUE(MaybeSimdTypeToMIRType(type, &ret));
     return ret;
 }
 
 static inline
 SimdType MIRTypeToSimdType(MIRType type)
 {
     switch (type) {
       case MIRType::Int32x4:   return SimdType::Int32x4;
--- a/js/src/jsutil.h
+++ b/js/src/jsutil.h
@@ -17,19 +17,16 @@
 #include "mozilla/PodOperations.h"
 
 #include <limits.h>
 
 #include "js/Initialization.h"
 #include "js/Utility.h"
 #include "js/Value.h"
 
-#define JS_ALWAYS_TRUE(expr)      MOZ_ALWAYS_TRUE(expr)
-#define JS_ALWAYS_FALSE(expr)     MOZ_ALWAYS_FALSE(expr)
-
 #if defined(JS_DEBUG)
 # define JS_DIAGNOSTICS_ASSERT(expr) MOZ_ASSERT(expr)
 #elif defined(JS_CRASH_DIAGNOSTICS)
 # define JS_DIAGNOSTICS_ASSERT(expr) do { if (MOZ_UNLIKELY(!(expr))) MOZ_CRASH(); } while(0)
 #else
 # define JS_DIAGNOSTICS_ASSERT(expr) ((void) 0)
 #endif
 
--- a/js/src/vm/Interpreter.cpp
+++ b/js/src/vm/Interpreter.cpp
@@ -3173,17 +3173,17 @@ CASE(JSOP_OPTIMIZE_SPREADCALL)
         goto error;
 
     PUSH_BOOLEAN(optimized);
 }
 END_CASE(JSOP_OPTIMIZE_SPREADCALL)
 
 CASE(JSOP_THROWMSG)
 {
-    JS_ALWAYS_FALSE(ThrowMsgOperation(cx, GET_UINT16(REGS.pc)));
+    MOZ_ALWAYS_FALSE(ThrowMsgOperation(cx, GET_UINT16(REGS.pc)));
     goto error;
 }
 END_CASE(JSOP_THROWMSG)
 
 CASE(JSOP_IMPLICITTHIS)
 CASE(JSOP_GIMPLICITTHIS)
 {
     JSOp op = JSOp(*REGS.pc);
@@ -3914,17 +3914,17 @@ CASE(JSOP_THROWING)
 }
 END_CASE(JSOP_THROWING)
 
 CASE(JSOP_THROW)
 {
     CHECK_BRANCH();
     ReservedRooted<Value> v(&rootValue0);
     POP_COPY_TO(v);
-    JS_ALWAYS_FALSE(Throw(cx, v));
+    MOZ_ALWAYS_FALSE(Throw(cx, v));
     /* let the code at error try to catch the exception. */
     goto error;
 }
 
 CASE(JSOP_INSTANCEOF)
 {
     ReservedRooted<Value> rref(&rootValue0, REGS.sp[-1]);
     if (HandleValue(rref).isPrimitive()) {
--- a/js/src/vm/JSAtom.cpp
+++ b/js/src/vm/JSAtom.cpp
@@ -744,17 +744,17 @@ js::XDRAtom(XDRState<mode>* xdr, Mutable
              * most allocations here will be bigger than tempLifoAlloc's default
              * chunk size.
              */
             chars = cx->pod_malloc<char16_t>(length);
             if (!chars)
                 return fail(JS::TranscodeResult_Throw);
         }
 
-        JS_ALWAYS_TRUE(xdr->codeChars(chars, length));
+        MOZ_ALWAYS_TRUE(xdr->codeChars(chars, length));
         atom = AtomizeChars(cx, chars, length);
         if (chars != stackChars)
             js_free(chars);
 #endif /* !MOZ_LITTLE_ENDIAN */
     }
 
     if (!atom)
         return xdr->fail(JS::TranscodeResult_Throw);
--- a/js/src/vm/JSObject.cpp
+++ b/js/src/vm/JSObject.cpp
@@ -508,17 +508,17 @@ js::SetIntegrityLevel(JSContext* cx, Han
                 MarkTypePropertyNonWritable(cx, nobj, child.get().propid);
 
             last = cx->zone()->propertyTree().getChild(cx, last, child);
             if (!last)
                 return false;
         }
 
         MOZ_ASSERT(nobj->lastProperty()->slotSpan() == last->slotSpan());
-        JS_ALWAYS_TRUE(nobj->setLastProperty(cx, last));
+        MOZ_ALWAYS_TRUE(nobj->setLastProperty(cx, last));
 
         // Ordinarily ArraySetLength handles this, but we're going behind its back
         // right now, so we must do this manually.
         if (level == IntegrityLevel::Frozen && obj->is<ArrayObject>()) {
             if (!obj->as<ArrayObject>().maybeCopyElementsForWrite(cx))
                 return false;
             obj->as<ArrayObject>().setNonWritableLength(cx);
         }
--- a/js/src/vm/NativeObject-inl.h
+++ b/js/src/vm/NativeObject-inl.h
@@ -30,17 +30,17 @@ NativeObject::fixedData(size_t nslots) c
     MOZ_ASSERT(nslots == numFixedSlots() + (hasPrivate() ? 1 : 0));
     return reinterpret_cast<uint8_t*>(&fixedSlots()[nslots]);
 }
 
 inline void
 NativeObject::removeLastProperty(JSContext* cx)
 {
     MOZ_ASSERT(canRemoveLastProperty());
-    JS_ALWAYS_TRUE(setLastProperty(cx, lastProperty()->previous()));
+    MOZ_ALWAYS_TRUE(setLastProperty(cx, lastProperty()->previous()));
 }
 
 inline bool
 NativeObject::canRemoveLastProperty()
 {
     /*
      * Check that the information about the object stored in the last
      * property's base shape is consistent with that stored in the previous
--- a/js/src/vm/Shape.cpp
+++ b/js/src/vm/Shape.cpp
@@ -1189,17 +1189,17 @@ NativeObject::removeProperty(JSContext* 
             Shape* oldLastProp = obj->lastProperty();
             shape->removeFromDictionary(obj);
 
             /* Hand off table from the old to new last property. */
             oldLastProp->handoffTableTo(obj->lastProperty());
         }
 
         /* Generate a new shape for the object, infallibly. */
-        JS_ALWAYS_TRUE(NativeObject::generateOwnShape(cx, obj, spare));
+        MOZ_ALWAYS_TRUE(NativeObject::generateOwnShape(cx, obj, spare));
 
         /* Consider shrinking table if its load factor is <= .25. */
         uint32_t size = table->capacity();
         if (size > ShapeTable::MIN_SIZE && table->entryCount() <= size >> 2)
             (void) table->change(cx, -1);
     } else {
         /*
          * Non-dictionary-mode shape tables are shared immutables, so all we
@@ -1225,17 +1225,17 @@ NativeObject::clear(JSContext* cx, Handl
         shape = shape->parent;
         MOZ_ASSERT(obj->inDictionaryMode() == shape->inDictionary());
     }
     MOZ_ASSERT(shape->isEmptyShape());
 
     if (obj->inDictionaryMode())
         shape->listp = obj->shapePtr();
 
-    JS_ALWAYS_TRUE(obj->setLastProperty(cx, shape));
+    MOZ_ALWAYS_TRUE(obj->setLastProperty(cx, shape));
 
     obj->checkShapeConsistency();
 }
 
 /* static */ bool
 NativeObject::rollbackProperties(JSContext* cx, HandleNativeObject obj, uint32_t slotSpan)
 {
     /*
--- a/js/src/vm/TypeInference.cpp
+++ b/js/src/vm/TypeInference.cpp
@@ -2466,17 +2466,17 @@ TemporaryTypeSet::getCommonPrototype(Com
             if (nproto != TaggedProto(*proto))
                 return false;
         }
     }
 
     // Guard against mutating __proto__.
     for (unsigned i = 0; i < count; i++) {
         if (ObjectKey* key = getObject(i))
-            JS_ALWAYS_TRUE(key->hasStableClassAndProto(constraints));
+            MOZ_ALWAYS_TRUE(key->hasStableClassAndProto(constraints));
     }
 
     return true;
 }
 
 bool
 TemporaryTypeSet::propertyNeedsBarrier(CompilerConstraintList* constraints, jsid id)
 {
--- a/js/src/vm/UnboxedObject.cpp
+++ b/js/src/vm/UnboxedObject.cpp
@@ -1189,17 +1189,17 @@ GetValuesFromPreliminaryPlainObject(Plai
 
 void
 UnboxedPlainObject::fillAfterConvert(JSContext* cx,
                                      Handle<GCVector<Value>> values, size_t* valueCursor)
 {
     initExpando();
     memset(data(), 0, layout().size());
     for (size_t i = 0; i < layout().properties().length(); i++)
-        JS_ALWAYS_TRUE(setValue(cx, layout().properties()[i], NextValue(values, valueCursor)));
+        MOZ_ALWAYS_TRUE(setValue(cx, layout().properties()[i], NextValue(values, valueCursor)));
 }
 
 bool
 js::TryConvertToUnboxedLayout(JSContext* cx, AutoEnterAnalysis& enter, Shape* templateShape,
                               ObjectGroup* group, PreliminaryObjectArray* objects)
 {
     MOZ_ASSERT(templateShape);
 
--- a/js/src/wasm/AsmJS.cpp
+++ b/js/src/wasm/AsmJS.cpp
@@ -2442,17 +2442,17 @@ class MOZ_STACK_CLASS ModuleValidator
             if (!funcName || !asmJSMetadata_->asmJSFuncNames.emplaceBack(Move(funcName)))
                 return nullptr;
         }
 
         uint32_t endBeforeCurly = tokenStream().anyCharsAccess().currentToken().pos.end;
         asmJSMetadata_->srcLength = endBeforeCurly - asmJSMetadata_->srcStart;
 
         TokenPos pos;
-        JS_ALWAYS_TRUE(tokenStream().peekTokenPos(&pos, TokenStreamShared::Operand));
+        MOZ_ALWAYS_TRUE(tokenStream().peekTokenPos(&pos, TokenStreamShared::Operand));
         uint32_t endAfterCurly = pos.end;
         asmJSMetadata_->srcLengthWithRightBrace = endAfterCurly - asmJSMetadata_->srcStart;
 
         ScriptedCaller scriptedCaller;
         if (parser_.ss->filename()) {
             scriptedCaller.line = scriptedCaller.column = 0;  // unused
             scriptedCaller.filename = DuplicateString(parser_.ss->filename());
             if (!scriptedCaller.filename)
@@ -2655,54 +2655,54 @@ ExtractNumericNonFloatValue(ParseNode* p
 }
 
 static NumLit
 ExtractSimdValue(ModuleValidator& m, ParseNode* pn)
 {
     MOZ_ASSERT(IsSimdLiteral(m, pn));
 
     SimdType type = SimdType::Count;
-    JS_ALWAYS_TRUE(IsSimdTuple(m, pn, &type));
+    MOZ_ALWAYS_TRUE(IsSimdTuple(m, pn, &type));
     MOZ_ASSERT(CallArgListLength(pn) == GetSimdLanes(type));
 
     ParseNode* arg = CallArgList(pn);
     switch (type) {
       case SimdType::Int8x16:
       case SimdType::Uint8x16: {
         MOZ_ASSERT(GetSimdLanes(type) == 16);
         int8_t val[16];
         for (size_t i = 0; i < 16; i++, arg = NextNode(arg)) {
             uint32_t u32;
-            JS_ALWAYS_TRUE(IsLiteralInt(m, arg, &u32));
+            MOZ_ALWAYS_TRUE(IsLiteralInt(m, arg, &u32));
             val[i] = int8_t(u32);
         }
         MOZ_ASSERT(arg == nullptr);
         NumLit::Which w = type == SimdType::Uint8x16 ? NumLit::Uint8x16 : NumLit::Int8x16;
         return NumLit(w, SimdConstant::CreateX16(val));
       }
       case SimdType::Int16x8:
       case SimdType::Uint16x8: {
         MOZ_ASSERT(GetSimdLanes(type) == 8);
         int16_t val[8];
         for (size_t i = 0; i < 8; i++, arg = NextNode(arg)) {
             uint32_t u32;
-            JS_ALWAYS_TRUE(IsLiteralInt(m, arg, &u32));
+            MOZ_ALWAYS_TRUE(IsLiteralInt(m, arg, &u32));
             val[i] = int16_t(u32);
         }
         MOZ_ASSERT(arg == nullptr);
         NumLit::Which w = type == SimdType::Uint16x8 ? NumLit::Uint16x8 : NumLit::Int16x8;
         return NumLit(w, SimdConstant::CreateX8(val));
       }
       case SimdType::Int32x4:
       case SimdType::Uint32x4: {
         MOZ_ASSERT(GetSimdLanes(type) == 4);
         int32_t val[4];
         for (size_t i = 0; i < 4; i++, arg = NextNode(arg)) {
             uint32_t u32;
-            JS_ALWAYS_TRUE(IsLiteralInt(m, arg, &u32));
+            MOZ_ALWAYS_TRUE(IsLiteralInt(m, arg, &u32));
             val[i] = int32_t(u32);
         }
         MOZ_ASSERT(arg == nullptr);
         NumLit::Which w = type == SimdType::Uint32x4 ? NumLit::Uint32x4 : NumLit::Int32x4;
         return NumLit(w, SimdConstant::CreateX4(val));
       }
       case SimdType::Float32x4: {
         MOZ_ASSERT(GetSimdLanes(type) == 4);
@@ -2712,39 +2712,39 @@ ExtractSimdValue(ModuleValidator& m, Par
         MOZ_ASSERT(arg == nullptr);
         return NumLit(NumLit::Float32x4, SimdConstant::CreateX4(val));
       }
       case SimdType::Bool8x16: {
         MOZ_ASSERT(GetSimdLanes(type) == 16);
         int8_t val[16];
         for (size_t i = 0; i < 16; i++, arg = NextNode(arg)) {
             uint32_t u32;
-            JS_ALWAYS_TRUE(IsLiteralInt(m, arg, &u32));
+            MOZ_ALWAYS_TRUE(IsLiteralInt(m, arg, &u32));
             val[i] = u32 ? -1 : 0;
         }
         MOZ_ASSERT(arg == nullptr);
         return NumLit(NumLit::Bool8x16, SimdConstant::CreateX16(val));
       }
       case SimdType::Bool16x8: {
         MOZ_ASSERT(GetSimdLanes(type) == 8);
         int16_t val[8];
         for (size_t i = 0; i < 8; i++, arg = NextNode(arg)) {
             uint32_t u32;
-            JS_ALWAYS_TRUE(IsLiteralInt(m, arg, &u32));
+            MOZ_ALWAYS_TRUE(IsLiteralInt(m, arg, &u32));
             val[i] = u32 ? -1 : 0;
         }
         MOZ_ASSERT(arg == nullptr);
         return NumLit(NumLit::Bool16x8, SimdConstant::CreateX8(val));
       }
       case SimdType::Bool32x4: {
         MOZ_ASSERT(GetSimdLanes(type) == 4);
         int32_t val[4];
         for (size_t i = 0; i < 4; i++, arg = NextNode(arg)) {
             uint32_t u32;
-            JS_ALWAYS_TRUE(IsLiteralInt(m, arg, &u32));
+            MOZ_ALWAYS_TRUE(IsLiteralInt(m, arg, &u32));
             val[i] = u32 ? -1 : 0;
         }
         MOZ_ASSERT(arg == nullptr);
         return NumLit(NumLit::Bool32x4, SimdConstant::CreateX4(val));
       }
       default:
         break;
     }
@@ -3096,17 +3096,17 @@ class MOZ_STACK_CLASS FunctionValidator
 
   public:
     bool pushBreakableBlock() {
         return encoder().writeOp(Op::Block) &&
                encoder().writeFixedU8(uint8_t(ExprType::Void)) &&
                breakableStack_.append(blockDepth_++);
     }
     bool popBreakableBlock() {
-        JS_ALWAYS_TRUE(breakableStack_.popCopy() == --blockDepth_);
+        MOZ_ALWAYS_TRUE(breakableStack_.popCopy() == --blockDepth_);
         return encoder().writeOp(Op::End);
     }
 
     bool pushUnbreakableBlock(const NameVector* labels = nullptr) {
         if (labels) {
             for (PropertyName* label : *labels) {
                 if (!breakLabels_.putNew(label, blockDepth_))
                     return false;
@@ -3126,31 +3126,31 @@ class MOZ_STACK_CLASS FunctionValidator
     }
 
     bool pushContinuableBlock() {
         return encoder().writeOp(Op::Block) &&
                encoder().writeFixedU8(uint8_t(ExprType::Void)) &&
                continuableStack_.append(blockDepth_++);
     }
     bool popContinuableBlock() {
-        JS_ALWAYS_TRUE(continuableStack_.popCopy() == --blockDepth_);
+        MOZ_ALWAYS_TRUE(continuableStack_.popCopy() == --blockDepth_);
         return encoder().writeOp(Op::End);
     }
 
     bool pushLoop() {
         return encoder().writeOp(Op::Block) &&
                encoder().writeFixedU8(uint8_t(ExprType::Void)) &&
                encoder().writeOp(Op::Loop) &&
                encoder().writeFixedU8(uint8_t(ExprType::Void)) &&
                breakableStack_.append(blockDepth_++) &&
                continuableStack_.append(blockDepth_++);
     }
     bool popLoop() {
-        JS_ALWAYS_TRUE(continuableStack_.popCopy() == --blockDepth_);
-        JS_ALWAYS_TRUE(breakableStack_.popCopy() == --blockDepth_);
+        MOZ_ALWAYS_TRUE(continuableStack_.popCopy() == --blockDepth_);
+        MOZ_ALWAYS_TRUE(breakableStack_.popCopy() == --blockDepth_);
         return encoder().writeOp(Op::End) &&
                encoder().writeOp(Op::End);
     }
 
     bool pushIf(size_t* typeAt) {
         ++blockDepth_;
         return encoder().writeOp(Op::If) &&
                encoder().writePatchableFixedU7(typeAt);
@@ -7835,17 +7835,17 @@ ValidateSimdType(JSContext* cx, const As
     RootedValue _(cx);
     return ValidateSimdType(cx, global, globalVal, &_);
 }
 
 static bool
 ValidateSimdOperation(JSContext* cx, const AsmJSGlobal& global, HandleValue globalVal)
 {
     RootedValue v(cx);
-    JS_ALWAYS_TRUE(ValidateSimdType(cx, global, globalVal, &v));
+    MOZ_ALWAYS_TRUE(ValidateSimdType(cx, global, globalVal, &v));
 
     if (!GetDataProperty(cx, v, global.field(), &v))
         return false;
 
     Native native = nullptr;
     switch (global.simdOperationType()) {
 #define SET_NATIVE_INT8X16(op) case SimdOperation::Fn_##op: native = simd_int8x16_##op; break;
 #define SET_NATIVE_INT16X8(op) case SimdOperation::Fn_##op: native = simd_int16x8_##op; break;