back out 3a8893b28489 (bug 712939) and 39adab158c17,16add78c43e3,37193db7e15b (bug 712873), for build bustage.
authorDaniel Holbert <dholbert@cs.stanford.edu>
Wed, 19 Feb 2014 00:15:51 -0800
changeset 169468 a6425a31c4c44089100e05490b6cc7936035662d
parent 169467 ed161be44ec3b7f62b9fb8917809f89121e964af
child 169469 82299ce5b67d7d39fab39aef09f5f0088e7fdd7e
push id26251
push usercbook@mozilla.com
push dateWed, 19 Feb 2014 12:59:09 +0000
treeherdermozilla-central@a6f7ad1e6090 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs712939, 712873
milestone30.0a1
backs out3a8893b28489c551f69630dd5cd76004910ad80d
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
back out 3a8893b28489 (bug 712939) and 39adab158c17,16add78c43e3,37193db7e15b (bug 712873), for build bustage.
content/base/src/nsDOMBlobBuilder.cpp
dom/mobilemessage/src/MmsMessage.cpp
dom/mobilemessage/src/MobileMessageManager.cpp
dom/mobilemessage/src/MobileMessageThread.cpp
dom/mobilemessage/src/SmsFilter.cpp
dom/plugins/base/nsJSNPRuntime.cpp
dom/plugins/base/nsNPAPIPlugin.h
dom/workers/File.cpp
dom/workers/WorkerPrivate.cpp
js/ipc/JavaScriptShared.cpp
js/jsd/jsd.h
js/jsd/jsd_atom.cpp
js/jsd/jsd_high.cpp
js/jsd/jsd_hook.cpp
js/jsd/jsd_lock.cpp
js/jsd/jsd_obj.cpp
js/jsd/jsd_scpt.cpp
js/jsd/jsd_stak.cpp
js/jsd/jsd_step.cpp
js/jsd/jsd_text.cpp
js/jsd/jsd_val.cpp
js/jsd/jsdebug.cpp
js/jsd/jshash.cpp
js/public/CharacterEncoding.h
js/public/Class.h
js/public/GCAPI.h
js/public/HashTable.h
js/public/HeapAPI.h
js/public/Id.h
js/public/ProfilingStack.h
js/public/RootingAPI.h
js/public/Utility.h
js/src/jsutil.h
js/xpconnect/src/Sandbox.cpp
tools/profiler/PseudoStack.h
xpcom/base/CycleCollectedJSRuntime.cpp
--- a/content/base/src/nsDOMBlobBuilder.cpp
+++ b/content/base/src/nsDOMBlobBuilder.cpp
@@ -229,17 +229,17 @@ nsDOMMultipartFile::ParseBlobArrayArgume
   JS::Rooted<JSObject*> obj(aCx, &aValue.toObject());
   if (!JS_IsArrayObject(aCx, obj)) {
     return NS_ERROR_TYPE_ERR; // We're not interested
   }
 
   BlobSet blobSet;
 
   uint32_t length;
-  MOZ_ALWAYS_TRUE(JS_GetArrayLength(aCx, obj, &length));
+  JS_ALWAYS_TRUE(JS_GetArrayLength(aCx, obj, &length));
   for (uint32_t i = 0; i < length; ++i) {
     JS::Rooted<JS::Value> element(aCx);
     if (!JS_GetElement(aCx, obj, i, &element))
       return NS_ERROR_TYPE_ERR;
 
     if (element.isObject()) {
       JS::Rooted<JSObject*> obj(aCx, &element.toObject());
       nsCOMPtr<nsIDOMBlob> blob = aUnwrapFunc(aCx, obj);
--- a/dom/mobilemessage/src/MmsMessage.cpp
+++ b/dom/mobilemessage/src/MmsMessage.cpp
@@ -209,17 +209,17 @@ MmsMessage::Create(int32_t              
     return NS_ERROR_INVALID_ARG;
   }
   JS::Rooted<JSObject*> deliveryInfoObj(aCx, &aDeliveryInfo.toObject());
   if (!JS_IsArrayObject(aCx, deliveryInfoObj)) {
     return NS_ERROR_INVALID_ARG;
   }
 
   uint32_t length;
-  MOZ_ALWAYS_TRUE(JS_GetArrayLength(aCx, deliveryInfoObj, &length));
+  JS_ALWAYS_TRUE(JS_GetArrayLength(aCx, deliveryInfoObj, &length));
 
   nsTArray<MmsDeliveryInfo> deliveryInfo;
   JS::Rooted<JS::Value> infoJsVal(aCx);
   for (uint32_t i = 0; i < length; ++i) {
     if (!JS_GetElement(aCx, deliveryInfoObj, i, &infoJsVal) ||
         !infoJsVal.isObject()) {
       return NS_ERROR_INVALID_ARG;
     }
@@ -235,17 +235,17 @@ MmsMessage::Create(int32_t              
   if (!aReceivers.isObject()) {
     return NS_ERROR_INVALID_ARG;
   }
   JS::Rooted<JSObject*> receiversObj(aCx, &aReceivers.toObject());
   if (!JS_IsArrayObject(aCx, receiversObj)) {
     return NS_ERROR_INVALID_ARG;
   }
 
-  MOZ_ALWAYS_TRUE(JS_GetArrayLength(aCx, receiversObj, &length));
+  JS_ALWAYS_TRUE(JS_GetArrayLength(aCx, receiversObj, &length));
 
   nsTArray<nsString> receivers;
   JS::Rooted<JS::Value> receiverJsVal(aCx);
   for (uint32_t i = 0; i < length; ++i) {
     if (!JS_GetElement(aCx, receiversObj, i, &receiverJsVal) ||
         !receiverJsVal.isString()) {
       return NS_ERROR_INVALID_ARG;
     }
@@ -270,17 +270,17 @@ MmsMessage::Create(int32_t              
     return NS_ERROR_INVALID_ARG;
   }
   JS::Rooted<JSObject*> attachmentsObj(aCx, &aAttachments.toObject());
   if (!JS_IsArrayObject(aCx, attachmentsObj)) {
     return NS_ERROR_INVALID_ARG;
   }
 
   nsTArray<MmsAttachment> attachments;
-  MOZ_ALWAYS_TRUE(JS_GetArrayLength(aCx, attachmentsObj, &length));
+  JS_ALWAYS_TRUE(JS_GetArrayLength(aCx, attachmentsObj, &length));
 
   JS::Rooted<JS::Value> attachmentJsVal(aCx);
   for (uint32_t i = 0; i < length; ++i) {
     if (!JS_GetElement(aCx, attachmentsObj, i, &attachmentJsVal)) {
       return NS_ERROR_INVALID_ARG;
     }
 
     MmsAttachment attachment;
--- a/dom/mobilemessage/src/MobileMessageManager.cpp
+++ b/dom/mobilemessage/src/MobileMessageManager.cpp
@@ -345,17 +345,17 @@ MobileMessageManager::Delete(JS::Handle<
     NS_ENSURE_SUCCESS(rv, rv);
 
     size = 1;
     idArray = &id;
   } else {
     // Int32[], SmsMessage[], or MmsMessage[]
     JS::Rooted<JSObject*> ids(aCx, &aParam.toObject());
 
-    MOZ_ALWAYS_TRUE(JS_GetArrayLength(aCx, ids, &size));
+    JS_ALWAYS_TRUE(JS_GetArrayLength(aCx, ids, &size));
     nsAutoArrayPtr<int32_t> idAutoArray(new int32_t[size]);
 
     JS::Rooted<JS::Value> idJsValue(aCx);
     for (uint32_t i = 0; i < size; i++) {
       if (!JS_GetElement(aCx, ids, i, &idJsValue)) {
         return NS_ERROR_INVALID_ARG;
       }
 
--- a/dom/mobilemessage/src/MobileMessageThread.cpp
+++ b/dom/mobilemessage/src/MobileMessageThread.cpp
@@ -6,16 +6,17 @@
 #include "MobileMessageThread.h"
 #include "nsIDOMClassInfo.h"
 #include "jsapi.h"           // For OBJECT_TO_JSVAL and JS_NewDateObjectMsec
 #include "jsfriendapi.h"     // For js_DateGetMsecSinceEpoch
 #include "nsJSUtils.h"       // For nsDependentJSString
 #include "nsTArrayHelpers.h" // For nsTArrayToJSArray
 #include "mozilla/dom/mobilemessage/Constants.h" // For MessageType
 
+
 using namespace mozilla::dom::mobilemessage;
 
 DOMCI_DATA(MozMobileMessageThread, mozilla::dom::MobileMessageThread)
 
 namespace mozilla {
 namespace dom {
 
 NS_INTERFACE_MAP_BEGIN(MobileMessageThread)
@@ -55,17 +56,17 @@ MobileMessageThread::Create(const uint64
     }
 
     JS::Rooted<JSObject*> obj(aCx, &aParticipants.toObject());
     if (!JS_IsArrayObject(aCx, obj)) {
       return NS_ERROR_INVALID_ARG;
     }
 
     uint32_t length;
-    MOZ_ALWAYS_TRUE(JS_GetArrayLength(aCx, obj, &length));
+    JS_ALWAYS_TRUE(JS_GetArrayLength(aCx, obj, &length));
     NS_ENSURE_TRUE(length, NS_ERROR_INVALID_ARG);
 
     for (uint32_t i = 0; i < length; ++i) {
       JS::Rooted<JS::Value> val(aCx);
 
       if (!JS_GetElement(aCx, obj, i, &val) || !val.isString()) {
         return NS_ERROR_INVALID_ARG;
       }
--- a/dom/mobilemessage/src/SmsFilter.cpp
+++ b/dom/mobilemessage/src/SmsFilter.cpp
@@ -167,17 +167,17 @@ SmsFilter::SetNumbers(JSContext* aCx, JS
   }
 
   JS::Rooted<JSObject*> obj(aCx, &aNumbers.toObject());
   if (!JS_IsArrayObject(aCx, obj)) {
     return NS_ERROR_INVALID_ARG;
   }
 
   uint32_t size;
-  MOZ_ALWAYS_TRUE(JS_GetArrayLength(aCx, obj, &size));
+  JS_ALWAYS_TRUE(JS_GetArrayLength(aCx, obj, &size));
 
   nsTArray<nsString> numbers;
 
   for (uint32_t i=0; i<size; ++i) {
     JS::Rooted<JS::Value> jsNumber(aCx);
     if (!JS_GetElement(aCx, obj, i, &jsNumber)) {
       return NS_ERROR_INVALID_ARG;
     }
--- a/dom/plugins/base/nsJSNPRuntime.cpp
+++ b/dom/plugins/base/nsJSNPRuntime.cpp
@@ -1584,17 +1584,17 @@ NPObjWrapper_NewResolve(JSContext *cx, J
 
   // no property or method
   return true;
 }
 
 static bool
 NPObjWrapper_Convert(JSContext *cx, JS::Handle<JSObject*> obj, JSType hint, JS::MutableHandle<JS::Value> vp)
 {
-  MOZ_ASSERT(hint == JSTYPE_NUMBER || hint == JSTYPE_STRING || hint == JSTYPE_VOID);
+  JS_ASSERT(hint == JSTYPE_NUMBER || hint == JSTYPE_STRING || hint == JSTYPE_VOID);
 
   // Plugins do not simply use JS_ConvertStub, and the default [[DefaultValue]]
   // behavior, because that behavior involves calling toString or valueOf on
   // objects which weren't designed to accommodate this.  Usually this wouldn't
   // be a problem, because the absence of either property, or the presence of
   // either property with a value that isn't callable, will cause that property
   // to simply be ignored.  But there is a problem in one specific case: Java,
   // specifically java.lang.Integer.  The Integer class has static valueOf
--- a/dom/plugins/base/nsNPAPIPlugin.h
+++ b/dom/plugins/base/nsNPAPIPlugin.h
@@ -65,18 +65,17 @@ protected:
   NPPluginFuncs mPluginFuncs;
   PluginLibrary* mLibrary;
 };
 
 namespace mozilla {
 namespace plugins {
 namespace parent {
 
-static_assert(sizeof(NPIdentifier) == sizeof(jsid),
-              "NPIdentifier must be binary compatible with jsid.");
+JS_STATIC_ASSERT(sizeof(NPIdentifier) == sizeof(jsid));
 
 inline jsid
 NPIdentifierToJSId(NPIdentifier id)
 {
     jsid tmp;
     JSID_BITS(tmp) = (size_t)id;
     return tmp;
 }
--- a/dom/workers/File.cpp
+++ b/dom/workers/File.cpp
@@ -41,17 +41,17 @@ public:
   {
     return JS_InitClass(aCx, aObj, JS::NullPtr(), &sClass, Construct, 0,
                         sProperties, sFunctions, nullptr, nullptr);
   }
 
   static JSObject*
   Create(JSContext* aCx, nsIDOMBlob* aBlob)
   {
-    MOZ_ASSERT(SameCOMIdentity(static_cast<nsISupports*>(aBlob), aBlob));
+    JS_ASSERT(SameCOMIdentity(static_cast<nsISupports*>(aBlob), aBlob));
 
     JSObject* obj = JS_NewObject(aCx, &sClass, JS::NullPtr(), JS::NullPtr());
     if (obj) {
       JS_SetPrivate(obj, aBlob);
       NS_ADDREF(aBlob);
     }
     return obj;
   }
@@ -96,17 +96,17 @@ private:
 
     JS_SET_RVAL(aCx, aVp, OBJECT_TO_JSVAL(obj));
     return true;
   }
 
   static void
   Finalize(JSFreeOp* aFop, JSObject* aObj)
   {
-    MOZ_ASSERT(JS_GetClass(aObj) == &sClass);
+    JS_ASSERT(JS_GetClass(aObj) == &sClass);
 
     nsIDOMBlob* blob = GetPrivate(aObj);
     NS_IF_RELEASE(blob);
   }
 
   static bool
   IsBlob(JS::Handle<JS::Value> v)
   {
@@ -243,17 +243,17 @@ public:
   {
     return JS_InitClass(aCx, aObj, aParentProto, &sClass, Construct, 0,
                         sProperties, nullptr, nullptr, nullptr);
   }
 
   static JSObject*
   Create(JSContext* aCx, nsIDOMFile* aFile)
   {
-    MOZ_ASSERT(SameCOMIdentity(static_cast<nsISupports*>(aFile), aFile));
+    JS_ASSERT(SameCOMIdentity(static_cast<nsISupports*>(aFile), aFile));
 
     JSObject* obj = JS_NewObject(aCx, &sClass, JS::NullPtr(), JS::NullPtr());
     if (obj) {
       JS_SetPrivate(obj, aFile);
       NS_ADDREF(aFile);
     }
     return obj;
   }
@@ -261,17 +261,17 @@ public:
   static nsIDOMFile*
   GetPrivate(JSObject* aObj)
   {
     if (aObj) {
       const JSClass* classPtr = JS_GetClass(aObj);
       if (classPtr == &sClass) {
         nsISupports* priv = static_cast<nsISupports*>(JS_GetPrivate(aObj));
         nsCOMPtr<nsIDOMFile> file = do_QueryInterface(priv);
-        MOZ_ASSERT_IF(priv, file);
+        JS_ASSERT_IF(priv, file);
         return file;
       }
     }
     return nullptr;
   }
 
   static const JSClass*
   Class()
@@ -301,17 +301,17 @@ private:
                          JSMSG_WRONG_CONSTRUCTOR,
                          sClass.name);
     return false;
   }
 
   static void
   Finalize(JSFreeOp* aFop, JSObject* aObj)
   {
-    MOZ_ASSERT(JS_GetClass(aObj) == &sClass);
+    JS_ASSERT(JS_GetClass(aObj) == &sClass);
 
     nsIDOMFile* file = GetPrivate(aObj);
     NS_IF_RELEASE(file);
   }
 
   static bool
   IsFile(JS::Handle<JS::Value> v)
   {
@@ -445,17 +445,17 @@ const JSPropertySpec File::sProperties[]
 nsIDOMBlob*
 Blob::GetPrivate(JSObject* aObj)
 {
   if (aObj) {
     const JSClass* classPtr = JS_GetClass(aObj);
     if (classPtr == &sClass || classPtr == File::Class()) {
       nsISupports* priv = static_cast<nsISupports*>(JS_GetPrivate(aObj));
       nsCOMPtr<nsIDOMBlob> blob = do_QueryInterface(priv);
-      MOZ_ASSERT_IF(priv, blob);
+      JS_ASSERT_IF(priv, blob);
       return blob;
     }
   }
   return nullptr;
 }
 
 } // anonymous namespace
 
--- a/dom/workers/WorkerPrivate.cpp
+++ b/dom/workers/WorkerPrivate.cpp
@@ -297,21 +297,21 @@ LogErrorToConsole(const nsAString& aMess
 struct WorkerStructuredCloneCallbacks
 {
   static JSObject*
   Read(JSContext* aCx, JSStructuredCloneReader* aReader, uint32_t aTag,
        uint32_t aData, void* aClosure)
   {
     // See if object is a nsIDOMFile pointer.
     if (aTag == DOMWORKER_SCTAG_FILE) {
-      MOZ_ASSERT(!aData);
+      JS_ASSERT(!aData);
 
       nsIDOMFile* file;
       if (JS_ReadBytes(aReader, &file, sizeof(file))) {
-        MOZ_ASSERT(file);
+        JS_ASSERT(file);
 
 #ifdef DEBUG
         {
           // File should not be mutable.
           nsCOMPtr<nsIMutable> mutableFile = do_QueryInterface(file);
           bool isMutable;
           NS_ASSERTION(NS_SUCCEEDED(mutableFile->GetMutable(&isMutable)) &&
                        !isMutable,
@@ -322,21 +322,21 @@ struct WorkerStructuredCloneCallbacks
         // nsIDOMFiles should be threadsafe, thus we will use the same instance
         // in the worker.
         JSObject* jsFile = file::CreateFile(aCx, file);
         return jsFile;
       }
     }
     // See if object is a nsIDOMBlob pointer.
     else if (aTag == DOMWORKER_SCTAG_BLOB) {
-      MOZ_ASSERT(!aData);
+      JS_ASSERT(!aData);
 
       nsIDOMBlob* blob;
       if (JS_ReadBytes(aReader, &blob, sizeof(blob))) {
-        MOZ_ASSERT(blob);
+        JS_ASSERT(blob);
 
 #ifdef DEBUG
         {
           // Blob should not be mutable.
           nsCOMPtr<nsIMutable> mutableBlob = do_QueryInterface(blob);
           bool isMutable;
           NS_ASSERTION(NS_SUCCEEDED(mutableBlob->GetMutable(&isMutable)) &&
                        !isMutable,
@@ -347,17 +347,17 @@ struct WorkerStructuredCloneCallbacks
         // nsIDOMBlob should be threadsafe, thus we will use the same instance
         // in the worker.
         JSObject* jsBlob = file::CreateBlob(aCx, blob);
         return jsBlob;
       }
     }
     // See if the object is an ImageData.
     else if (aTag == SCTAG_DOM_IMAGEDATA) {
-      MOZ_ASSERT(!aData);
+      JS_ASSERT(!aData);
 
       // Read the information out of the stream.
       uint32_t width, height;
       JS::Rooted<JS::Value> dataArray(aCx);
       if (!JS_ReadUint32Pair(aReader, &width, &height) ||
           !JS_ReadTypedArray(aReader, dataArray.address()))
       {
         return nullptr;
@@ -454,21 +454,21 @@ struct MainThreadWorkerStructuredCloneCa
   static JSObject*
   Read(JSContext* aCx, JSStructuredCloneReader* aReader, uint32_t aTag,
        uint32_t aData, void* aClosure)
   {
     AssertIsOnMainThread();
 
     // See if object is a nsIDOMFile pointer.
     if (aTag == DOMWORKER_SCTAG_FILE) {
-      MOZ_ASSERT(!aData);
+      JS_ASSERT(!aData);
 
       nsIDOMFile* file;
       if (JS_ReadBytes(aReader, &file, sizeof(file))) {
-        MOZ_ASSERT(file);
+        JS_ASSERT(file);
 
 #ifdef DEBUG
         {
           // File should not be mutable.
           nsCOMPtr<nsIMutable> mutableFile = do_QueryInterface(file);
           bool isMutable;
           NS_ASSERTION(NS_SUCCEEDED(mutableFile->GetMutable(&isMutable)) &&
                        !isMutable,
@@ -488,21 +488,21 @@ struct MainThreadWorkerStructuredCloneCa
           return nullptr;
         }
 
         return &wrappedFile.toObject();
       }
     }
     // See if object is a nsIDOMBlob pointer.
     else if (aTag == DOMWORKER_SCTAG_BLOB) {
-      MOZ_ASSERT(!aData);
+      JS_ASSERT(!aData);
 
       nsIDOMBlob* blob;
       if (JS_ReadBytes(aReader, &blob, sizeof(blob))) {
-        MOZ_ASSERT(blob);
+        JS_ASSERT(blob);
 
 #ifdef DEBUG
         {
           // Blob should not be mutable.
           nsCOMPtr<nsIMutable> mutableBlob = do_QueryInterface(blob);
           bool isMutable;
           NS_ASSERTION(NS_SUCCEEDED(mutableBlob->GetMutable(&isMutable)) &&
                        !isMutable,
--- a/js/ipc/JavaScriptShared.cpp
+++ b/js/ipc/JavaScriptShared.cpp
@@ -175,17 +175,17 @@ JavaScriptShared::toVariant(JSContext *c
         return true;
       }
 
       case JSTYPE_OBJECT:
       case JSTYPE_FUNCTION:
       {
         RootedObject obj(cx, from.toObjectOrNull());
         if (!obj) {
-            MOZ_ASSERT(from == JSVAL_NULL);
+            JS_ASSERT(from == JSVAL_NULL);
             *to = uint64_t(0);
             return true;
         }
 
         if (xpc_JSObjectIsID(cx, obj)) {
             JSIID iid;
             const nsID *id = xpc_JSObjectToID(cx, obj);
             ConvertID(*id, &iid);
--- a/js/jsd/jsd.h
+++ b/js/jsd/jsd.h
@@ -729,23 +729,23 @@ jsd_SetException(JSDContext* jsdc, JSDTh
 #ifdef JSD_THREADSAFE
 
 /* the system-wide lock */
 extern JSDStaticLock* _jsd_global_lock;
 #define JSD_LOCK()                               \
     JS_BEGIN_MACRO                               \
         if(!_jsd_global_lock)                    \
             _jsd_global_lock = jsd_CreateLock(); \
-        MOZ_ASSERT(_jsd_global_lock);            \
+        JS_ASSERT(_jsd_global_lock);             \
         jsd_Lock(_jsd_global_lock);              \
     JS_END_MACRO
 
 #define JSD_UNLOCK()                             \
     JS_BEGIN_MACRO                               \
-        MOZ_ASSERT(_jsd_global_lock);            \
+        JS_ASSERT(_jsd_global_lock);             \
         jsd_Unlock(_jsd_global_lock);            \
     JS_END_MACRO
 
 /* locks for the subsystems of a given context */
 #define JSD_INIT_LOCKS(jsdc)                                       \
     ( (nullptr != (jsdc->scriptsLock      = jsd_CreateLock())) &&  \
       (nullptr != (jsdc->sourceTextLock   = jsd_CreateLock())) &&  \
       (nullptr != (jsdc->atomsLock        = jsd_CreateLock())) &&  \
--- a/js/jsd/jsd_atom.cpp
+++ b/js/jsd/jsd_atom.cpp
@@ -34,19 +34,19 @@ static void
     jsd_DropAtom(jsdc, atom3);
     jsd_DropAtom(jsdc, atom4);
 }        
 #endif    
 
 static int
 _atom_smasher(JSHashEntry *he, int i, void *arg)
 {
-    MOZ_ASSERT(he);
-    MOZ_ASSERT(he->value);
-    MOZ_ASSERT(((JSDAtom*)(he->value))->str);
+    JS_ASSERT(he);
+    JS_ASSERT(he->value);
+    JS_ASSERT(((JSDAtom*)(he->value))->str);
 
     free(((JSDAtom*)(he->value))->str);
     free(he->value);
     he->value = nullptr;
     he->key   = nullptr;
     return HT_ENUMERATE_NEXT;
 }
 
@@ -88,17 +88,17 @@ jsd_DestroyAtomTable(JSDContext* jsdc)
 
 JSDAtom*
 jsd_AddAtom(JSDContext* jsdc, const char* str)
 {
     JSDAtom* atom;
 
     if(!str)
     {
-        MOZ_ASSERT(0);
+        JS_ASSERT(0);
         return nullptr;
     }
 
     JSD_LOCK_ATOMS(jsdc);
     
     atom = (JSDAtom*) JS_HashTableLookup(jsdc->atoms, str);
 
     if( atom )
--- a/js/jsd/jsd_high.cpp
+++ b/js/jsd/jsd_high.cpp
@@ -29,19 +29,19 @@ static void* _dangerousThread = nullptr;
 
 #ifdef JSD_THREADSAFE
 JSDStaticLock* _jsd_global_lock = nullptr;
 #endif
 
 #ifdef DEBUG
 void JSD_ASSERT_VALID_CONTEXT(JSDContext* jsdc)
 {
-    MOZ_ASSERT(jsdc->inited);
-    MOZ_ASSERT(jsdc->jsrt);
-    MOZ_ASSERT(jsdc->glob);
+    JS_ASSERT(jsdc->inited);
+    JS_ASSERT(jsdc->jsrt);
+    JS_ASSERT(jsdc->glob);
 }
 #endif
 
 /***************************************************************************/
 /* xpconnect related utility functions implemented in jsd_xpc.cpp */
 
 extern void
 global_finalize(JSFreeOp* fop, JSObject* obj);
@@ -204,18 +204,18 @@ jsd_DebuggerOnForUser(JSRuntime*        
     if( jsdc->userCallbacks.setContext )
         jsdc->userCallbacks.setContext(jsdc, jsdc->user);
     return jsdc;
 }
 
 JSDContext*
 jsd_DebuggerOn(void)
 {
-    MOZ_ASSERT(_jsrt);
-    MOZ_ASSERT(_validateUserCallbacks(&_callbacks));
+    JS_ASSERT(_jsrt);
+    JS_ASSERT(_validateUserCallbacks(&_callbacks));
     return jsd_DebuggerOnForUser(_jsrt, &_callbacks, _user, nullptr);
 }
 
 void
 jsd_DebuggerOff(JSDContext* jsdc)
 {
     jsd_DebuggerPause(jsdc, true);
     /* clear hooks here */
@@ -332,17 +332,17 @@ jsd_DebugErrorHook(JSContext *cx, const 
                    JSErrorReport *report, void *closure)
 {
     JSDContext* jsdc = (JSDContext*) closure;
     JSD_ErrorReporter errorReporter;
     void*             errorReporterData;
     
     if( ! jsdc )
     {
-        MOZ_ASSERT(0);
+        JS_ASSERT(0);
         return true;
     }
     if( JSD_IS_DANGEROUS_THREAD(jsdc) )
         return true;
 
     /* local in case hook gets cleared on another thread */
     JSD_LOCK();
     errorReporter     = jsdc->errorReporter;
@@ -375,17 +375,17 @@ jsd_DebugErrorHook(JSContext *cx, const 
             /* XXX Should make this dependent on ExecutionHook retval */
             return true;
         }
         case JSD_ERROR_REPORTER_CLEAR_RETURN:
             if(report && JSREPORT_IS_EXCEPTION(report->flags))
                 JS_ClearPendingException(cx);
             return false;
         default:
-            MOZ_ASSERT(0);
+            JS_ASSERT(0);
             break;
     }
     return true;
 }
 
 bool
 jsd_SetErrorReporter(JSDContext*       jsdc, 
                      JSD_ErrorReporter reporter, 
--- a/js/jsd/jsd_hook.cpp
+++ b/js/jsd/jsd_hook.cpp
@@ -154,20 +154,20 @@ jsd_CallExecutionHook(JSDContext* jsdc,
         case JSD_HOOK_RETURN_RET_WITH_VAL:
             return JSTRAP_RETURN;
         case JSD_HOOK_RETURN_THROW_WITH_VAL:
             return JSTRAP_THROW;
         case JSD_HOOK_RETURN_CONTINUE:
             break;
         case JSD_HOOK_RETURN_CONTINUE_THROW:
             /* only makes sense for jsd_ThrowHandler (which init'd rval) */
-            MOZ_ASSERT(JSD_HOOK_THROW == type);
+            JS_ASSERT(JSD_HOOK_THROW == type);
             return JSTRAP_THROW;
         default:
-            MOZ_ASSERT(0);
+            JS_ASSERT(0);
             break;
     }
     return JSTRAP_CONTINUE;
 }
 
 bool
 jsd_CallCallHook (JSDContext* jsdc,
                   JSContext *cx,
--- a/js/jsd/jsd_lock.cpp
+++ b/js/jsd/jsd_lock.cpp
@@ -53,34 +53,34 @@ struct JSDStaticLock
 #undef _CURRENT_THREAD
 #ifdef JSD_ATTACH_THREAD_HACK
 #define _CURRENT_THREAD(out)                                                  \
 JS_BEGIN_MACRO                                                                \
     out = (void*) PR_GetCurrentThread();                                      \
     if(!out)                                                                  \
         out = (void*) JS_AttachThread(PR_USER_THREAD, PR_PRIORITY_NORMAL,     \
                                       nullptr);                               \
-    MOZ_ASSERT(out);                                                          \
+    JS_ASSERT(out);                                                           \
 JS_END_MACRO
 #else
 #define _CURRENT_THREAD(out)             \
 JS_BEGIN_MACRO                           \
     out = (void*) PR_GetCurrentThread(); \
-    MOZ_ASSERT(out);                     \
+    JS_ASSERT(out);                      \
 JS_END_MACRO
 #endif
 
 #ifdef DEBUG
 #define JSD_LOCK_SIG 0x10CC10CC
 void ASSERT_VALID_LOCK(JSDStaticLock* lock)
 {
-    MOZ_ASSERT(lock);
-    MOZ_ASSERT(lock->lock);
-    MOZ_ASSERT(lock->count >= 0);
-    MOZ_ASSERT(lock->sig == (uint16_t) JSD_LOCK_SIG);
+    JS_ASSERT(lock);
+    JS_ASSERT(lock->lock);
+    JS_ASSERT(lock->count >= 0);
+    JS_ASSERT(lock->sig == (uint16_t) JSD_LOCK_SIG);
 }    
 #else
 #define ASSERT_VALID_LOCK(x) ((void)0)
 #endif
 
 JSDStaticLock*
 jsd_CreateLock()
 {
@@ -106,37 +106,37 @@ jsd_Lock(JSDStaticLock* lock)
 {
     void* me;
     ASSERT_VALID_LOCK(lock);
     _CURRENT_THREAD(me);
 
     if(lock->owner == me)
     {
         lock->count++;
-        MOZ_ASSERT(lock->count > 1);
+        JS_ASSERT(lock->count > 1);
     }
     else
     {
         PR_Lock(lock->lock);            /* this can block... */
-        MOZ_ASSERT(lock->owner == 0);
-        MOZ_ASSERT(lock->count == 0);
+        JS_ASSERT(lock->owner == 0);
+        JS_ASSERT(lock->count == 0);
         lock->count = 1;
         lock->owner = me;
     }
 }    
 
 void
 jsd_Unlock(JSDStaticLock* lock)
 {
     void* me;
     ASSERT_VALID_LOCK(lock);
     _CURRENT_THREAD(me);
 
     /* it's an error to unlock a lock you don't own */
-    MOZ_ASSERT(lock->owner == me);
+    JS_ASSERT(lock->owner == me);
     if(lock->owner != me)
         return;
 
     if(--lock->count == 0)
     {
         lock->owner = nullptr;
         PR_Unlock(lock->lock);
     }
@@ -146,17 +146,17 @@ jsd_Unlock(JSDStaticLock* lock)
 bool
 jsd_IsLocked(JSDStaticLock* lock)
 {
     void* me;
     ASSERT_VALID_LOCK(lock);
     _CURRENT_THREAD(me);
     if (lock->owner != me)
         return false;
-    MOZ_ASSERT(lock->count > 0);
+    JS_ASSERT(lock->count > 0);
     return true;
 }    
 #endif /* DEBUG */
 
 void*
 jsd_CurrentThread()
 {
     void* me;
--- a/js/jsd/jsd_obj.cpp
+++ b/js/jsd/jsd_obj.cpp
@@ -50,27 +50,27 @@ static void
 }
 #else
 #define TRACEOBJ(jsdc, jsdobj, which) ((void)0)
 #endif /* JSD_TRACE */
 
 #ifdef DEBUG
 void JSD_ASSERT_VALID_OBJECT(JSDObject* jsdobj)
 {
-    MOZ_ASSERT(jsdobj);
-    MOZ_ASSERT(!JS_CLIST_IS_EMPTY(&jsdobj->links));
-    MOZ_ASSERT(jsdobj->obj);
+    JS_ASSERT(jsdobj);
+    JS_ASSERT(!JS_CLIST_IS_EMPTY(&jsdobj->links));
+    JS_ASSERT(jsdobj->obj);
 }
 #endif
 
 
 static void
 _destroyJSDObject(JSDContext* jsdc, JSDObject* jsdobj)
 {
-    MOZ_ASSERT(JSD_OBJECTS_LOCKED(jsdc));
+    JS_ASSERT(JSD_OBJECTS_LOCKED(jsdc));
 
     JS_REMOVE_LINK(&jsdobj->links);
     JS_HashTableRemove(jsdc->objectsTable, jsdobj->obj);
 
     if(jsdobj->newURL)
         jsd_DropAtom(jsdc, jsdobj->newURL);
     if(jsdobj->ctorURL)
         jsd_DropAtom(jsdc, jsdobj->ctorURL);
@@ -151,17 +151,17 @@ jsd_DestroyObjects(JSDContext* jsdc)
     JSD_UNLOCK_OBJECTS(jsdc);
 }
 
 JSDObject*
 jsd_IterateObjects(JSDContext* jsdc, JSDObject** iterp)
 {
     JSDObject *jsdobj = *iterp;
 
-    MOZ_ASSERT(JSD_OBJECTS_LOCKED(jsdc));
+    JS_ASSERT(JSD_OBJECTS_LOCKED(jsdc));
 
     if( !jsdobj )
         jsdobj = (JSDObject *)jsdc->objectsList.next;
     if( jsdobj == (JSDObject *)&jsdc->objectsList )
         return nullptr;
     *iterp = (JSDObject*) jsdobj->links.next;
     return jsdobj;
 }
--- a/js/jsd/jsd_scpt.cpp
+++ b/js/jsd/jsd_scpt.cpp
@@ -23,40 +23,40 @@ using mozilla::AutoSafeJSContext;
 
 #define NOT_SET_YET -1
 
 /***************************************************************************/
 
 #ifdef DEBUG
 void JSD_ASSERT_VALID_SCRIPT(JSDScript* jsdscript)
 {
-    MOZ_ASSERT(jsdscript);
-    MOZ_ASSERT(jsdscript->script);
+    JS_ASSERT(jsdscript);
+    JS_ASSERT(jsdscript->script);
 }
 void JSD_ASSERT_VALID_EXEC_HOOK(JSDExecHook* jsdhook)
 {
-    MOZ_ASSERT(jsdhook);
-    MOZ_ASSERT(jsdhook->hook);
+    JS_ASSERT(jsdhook);
+    JS_ASSERT(jsdhook->hook);
 }
 #endif
 
 static JSDScript*
 _newJSDScript(JSDContext*  jsdc,
               JSContext    *cx,
               JSScript     *script_)
 {
     JS::RootedScript script(cx, script_);
     if ( JS_GetScriptIsSelfHosted(script) )
         return nullptr;
 
     JSDScript*  jsdscript;
     unsigned     lineno;
     const char* raw_filename;
 
-    MOZ_ASSERT(JSD_SCRIPTS_LOCKED(jsdc));
+    JS_ASSERT(JSD_SCRIPTS_LOCKED(jsdc));
 
     /* these are inlined javascript: urls and we can't handle them now */
     lineno = (unsigned) JS_GetScriptBaseLineNumber(cx, script);
     if( lineno == 0 )
         return nullptr;
 
     jsdscript = (JSDScript*) calloc(1, sizeof(JSDScript));
     if( ! jsdscript )
@@ -77,17 +77,17 @@ static JSDScript*
     
     return jsdscript;
 }           
 
 static void 
 _destroyJSDScript(JSDContext*  jsdc,
                   JSDScript*   jsdscript)
 {
-    MOZ_ASSERT(JSD_SCRIPTS_LOCKED(jsdc));
+    JS_ASSERT(JSD_SCRIPTS_LOCKED(jsdc));
 
     /* destroy all hooks */
     jsd_ClearAllExecutionHooksForScript(jsdc, jsdscript);
 
     JS_REMOVE_LINK(&jsdscript->links);
     if(jsdscript->url)
         free(jsdscript->url);
 
@@ -125,17 +125,17 @@ static void
     n = size_t(snprintf(Buf, sizeof(Buf), "%sscript=%08X, %s, ",
                         leadingtext, (unsigned) jsdscript->script,
                         name ? name : "no URL"));
     if (n + 1 < sizeof(Buf)) {
         if (fun) {
             n += size_t(snprintf(Buf + n, sizeof(Buf) - n, "%s", "no fun"));
         } else {
             n += JS_PutEscapedFlatString(Buf + n, sizeof(Buf) - n,
-                                         MOZ_ASSERT_STRING_IS_FLAT(fun), 0);
+                                         JS_ASSERT_STRING_IS_FLAT(fun), 0);
             Buf[sizeof(Buf) - 1] = '\0';
         }
         if (n + 1 < sizeof(Buf))
             snprintf(Buf + n, sizeof(Buf) - n, ", %d-%d\n", base, base + extent - 1);
     }
     OutputDebugString( Buf );
 }
 
@@ -213,29 +213,29 @@ jsd_DestroyScriptManager(JSDContext* jsd
         JS_HashTableDestroy(jsdc->scriptsTable);
     JSD_UNLOCK_SCRIPTS(jsdc);
 }
 
 JSDScript*
 jsd_FindJSDScript( JSDContext*  jsdc,
                    JSScript     *script )
 {
-    MOZ_ASSERT(JSD_SCRIPTS_LOCKED(jsdc));
+    JS_ASSERT(JSD_SCRIPTS_LOCKED(jsdc));
     return (JSDScript*) JS_HashTableLookup(jsdc->scriptsTable, (void *)script);
 }
 
 JSDScript *
 jsd_FindOrCreateJSDScript(JSDContext    *jsdc,
                           JSContext     *cx,
                           JSScript      *script_,
                           JSAbstractFramePtr frame)
 {
     JS::RootedScript script(cx, script_);
     JSDScript *jsdscript;
-    MOZ_ASSERT(JSD_SCRIPTS_LOCKED(jsdc));
+    JS_ASSERT(JSD_SCRIPTS_LOCKED(jsdc));
 
     jsdscript = jsd_FindJSDScript(jsdc, script);
     if (jsdscript)
         return jsdscript;
 
     /* Fallback for unknown scripts: create a new script. */
     if (!frame) {
         JSBrokenFrameIterator iter(cx);
@@ -364,17 +364,17 @@ jsd_GetJSFunction (JSDContext *jsdc, JSD
     return JS_GetScriptFunction(cx, script->script);
 }
 
 JSDScript*
 jsd_IterateScripts(JSDContext* jsdc, JSDScript **iterp)
 {
     JSDScript *jsdscript = *iterp;
     
-    MOZ_ASSERT(JSD_SCRIPTS_LOCKED(jsdc));
+    JS_ASSERT(JSD_SCRIPTS_LOCKED(jsdc));
 
     if( !jsdscript )
         jsdscript = (JSDScript *)jsdc->scripts.next;
     if( jsdscript == (JSDScript *)&jsdc->scripts )
         return nullptr;
     *iterp = (JSDScript*) jsdscript->links.next;
     return jsdscript;
 }
@@ -393,17 +393,17 @@ jsd_GetScriptPrivate(JSDScript *jsdscrip
     return jsdscript->data;
 }
 
 bool
 jsd_IsActiveScript(JSDContext* jsdc, JSDScript *jsdscript)
 {
     JSDScript *current;
 
-    MOZ_ASSERT(JSD_SCRIPTS_LOCKED(jsdc));
+    JS_ASSERT(JSD_SCRIPTS_LOCKED(jsdc));
 
     for( current = (JSDScript *)jsdc->scripts.next;
          current != (JSDScript *)&jsdc->scripts;
          current = (JSDScript *)current->links.next )
     {
         if(jsdscript == current)
             return true;
     }
@@ -715,19 +715,19 @@ jsd_TrapHandler(JSContext *cx, JSScript 
     if( nullptr == (jsdc = jsd_JSDContextForJSContext(cx)) ||
         ! _isActiveHook(jsdc, script, jsdhook) )
     {
         JSD_UNLOCK();
         return JSTRAP_CONTINUE;
     }
 
     JSD_ASSERT_VALID_EXEC_HOOK(jsdhook);
-    MOZ_ASSERT(!jsdhook->pc || jsdhook->pc == (uintptr_t)pc);
-    MOZ_ASSERT(jsdhook->jsdscript->script == script);
-    MOZ_ASSERT(jsdhook->jsdscript->jsdc == jsdc);
+    JS_ASSERT(!jsdhook->pc || jsdhook->pc == (uintptr_t)pc);
+    JS_ASSERT(jsdhook->jsdscript->script == script);
+    JS_ASSERT(jsdhook->jsdscript->jsdc == jsdc);
 
     hook = jsdhook->hook;
     hookData = jsdhook->callerdata;
 
     /* do not use jsdhook-> after this point */
     JSD_UNLOCK();
 
     if( ! jsdc || ! jsdc->inited )
--- a/js/jsd/jsd_stak.cpp
+++ b/js/jsd/jsd_stak.cpp
@@ -12,24 +12,24 @@
 #include "jsfriendapi.h"
 #include "nsCxPusher.h"
 
 using mozilla::AutoPushJSContext;
 
 #ifdef DEBUG
 void JSD_ASSERT_VALID_THREAD_STATE(JSDThreadState* jsdthreadstate)
 {
-    MOZ_ASSERT(jsdthreadstate);
-    MOZ_ASSERT(jsdthreadstate->stackDepth > 0);
+    JS_ASSERT(jsdthreadstate);
+    JS_ASSERT(jsdthreadstate->stackDepth > 0);
 }
 
 void JSD_ASSERT_VALID_STACK_FRAME(JSDStackFrameInfo* jsdframe)
 {
-    MOZ_ASSERT(jsdframe);
-    MOZ_ASSERT(jsdframe->jsdthreadstate);
+    JS_ASSERT(jsdframe);
+    JS_ASSERT(jsdframe->jsdthreadstate);
 }
 #endif
 
 static JSDStackFrameInfo* 
 _addNewFrame(JSDContext*        jsdc,
              JSDThreadState*    jsdthreadstate,
              JSScript*          script,
              uintptr_t          pc,
@@ -143,18 +143,18 @@ jsd_NewThreadState(JSDContext* jsdc, JSC
 }
 
 void
 jsd_DestroyThreadState(JSDContext* jsdc, JSDThreadState* jsdthreadstate)
 {
     JSDStackFrameInfo* jsdframe;
     JSCList* list;
 
-    MOZ_ASSERT(jsdthreadstate);
-    MOZ_ASSERT(JSD_CURRENT_THREAD() == jsdthreadstate->thread);
+    JS_ASSERT(jsdthreadstate);
+    JS_ASSERT(JSD_CURRENT_THREAD() == jsdthreadstate->thread);
 
     JSD_LOCK_THREADSTATES(jsdc);
     JS_REMOVE_LINK(&jsdthreadstate->links);
     JSD_UNLOCK_THREADSTATES(jsdc);
 
     list = &jsdthreadstate->stack;
     while( (JSDStackFrameInfo*)list != (jsdframe = (JSDStackFrameInfo*)list->next) )
     {
@@ -397,27 +397,27 @@ jsd_EvaluateUCScriptInStackFrame(JSDCont
                                  const jschar *bytes, unsigned length,
                                  const char *filename, unsigned lineno,
                                  bool eatExceptions, JS::MutableHandleValue rval)
 {
     bool retval;
     bool valid;
     JSExceptionState* exceptionState = nullptr;
 
-    MOZ_ASSERT(JSD_CURRENT_THREAD() == jsdthreadstate->thread);
+    JS_ASSERT(JSD_CURRENT_THREAD() == jsdthreadstate->thread);
 
     JSD_LOCK_THREADSTATES(jsdc);
     valid = jsd_IsValidFrameInThreadState(jsdc, jsdthreadstate, jsdframe);
     JSD_UNLOCK_THREADSTATES(jsdc);
 
     if( ! valid )
         return false;
 
     AutoPushJSContext cx(jsdthreadstate->context);
-    MOZ_ASSERT(cx);
+    JS_ASSERT(cx);
 
     if (eatExceptions)
         exceptionState = JS_SaveExceptionState(cx);
     JS_ClearPendingException(cx);
     jsd_StartingEvalUsingFilename(jsdc, filename);
     retval = jsdframe->frame.evaluateUCInStackFrame(cx, bytes, length, filename, lineno,
                                                     rval);
     jsd_FinishedEvalUsingFilename(jsdc, filename);
@@ -434,27 +434,27 @@ jsd_EvaluateScriptInStackFrame(JSDContex
                                const char *bytes, unsigned length,
                                const char *filename, unsigned lineno,
                                bool eatExceptions, JS::MutableHandleValue rval)
 {
     bool retval;
     bool valid;
     JSExceptionState* exceptionState = nullptr;
 
-    MOZ_ASSERT(JSD_CURRENT_THREAD() == jsdthreadstate->thread);
+    JS_ASSERT(JSD_CURRENT_THREAD() == jsdthreadstate->thread);
 
     JSD_LOCK_THREADSTATES(jsdc);
     valid = jsd_IsValidFrameInThreadState(jsdc, jsdthreadstate, jsdframe);
     JSD_UNLOCK_THREADSTATES(jsdc);
 
     if (!valid)
         return false;
 
     AutoPushJSContext cx(jsdthreadstate->context);
-    MOZ_ASSERT(cx);
+    JS_ASSERT(cx);
 
     if (eatExceptions)
         exceptionState = JS_SaveExceptionState(cx);
     JS_ClearPendingException(cx);
     jsd_StartingEvalUsingFilename(jsdc, filename);
     retval = jsdframe->frame.evaluateInStackFrame(cx, bytes, length, filename, lineno,
                                                   rval);
     jsd_FinishedEvalUsingFilename(jsdc, filename);
@@ -478,50 +478,50 @@ jsd_ValToStringInStackFrame(JSDContext* 
     JSD_LOCK_THREADSTATES(jsdc);
     valid = jsd_IsValidFrameInThreadState(jsdc, jsdthreadstate, jsdframe);
     JSD_UNLOCK_THREADSTATES(jsdc);
 
     if( ! valid )
         return nullptr;
 
     cx = jsdthreadstate->context;
-    MOZ_ASSERT(cx);
+    JS_ASSERT(cx);
 
     JS::RootedValue v(cx, val);
     exceptionState = JS_SaveExceptionState(cx);
     retval = JS::ToString(cx, v);
     JS_RestoreExceptionState(cx, exceptionState);
 
     return retval;
 }
 
 bool
 jsd_IsValidThreadState(JSDContext*        jsdc, 
                        JSDThreadState*    jsdthreadstate)
 {
     JSDThreadState *cur;
 
-    MOZ_ASSERT( JSD_THREADSTATES_LOCKED(jsdc) );
+    JS_ASSERT( JSD_THREADSTATES_LOCKED(jsdc) );
 
     for( cur = (JSDThreadState*)jsdc->threadsStates.next;
          cur != (JSDThreadState*)&jsdc->threadsStates;
          cur = (JSDThreadState*)cur->links.next ) 
     {
         if( cur == jsdthreadstate )
             return true;
     }
     return false;
 }    
 
 bool
 jsd_IsValidFrameInThreadState(JSDContext*        jsdc, 
                               JSDThreadState*    jsdthreadstate,
                               JSDStackFrameInfo* jsdframe)
 {
-    MOZ_ASSERT(JSD_THREADSTATES_LOCKED(jsdc));
+    JS_ASSERT(JSD_THREADSTATES_LOCKED(jsdc));
 
     if( ! jsd_IsValidThreadState(jsdc, jsdthreadstate) )
         return false;
     if( jsdframe->jsdthreadstate != jsdthreadstate )
         return false;
 
     JSD_ASSERT_VALID_THREAD_STATE(jsdthreadstate);
     JSD_ASSERT_VALID_STACK_FRAME(jsdframe);
--- a/js/jsd/jsd_step.cpp
+++ b/js/jsd/jsd_step.cpp
@@ -67,17 +67,17 @@ static void
         printf("%s this: ", isConstructing ? "constructing":"");
 
         if (JS_GetFrameThis(cx, frame, &thisVal))
             printf("0x%0llx", (uintptr_t) thisVal);
         else
             puts("<unavailable>");
     }
     printf("\n");
-    MOZ_ASSERT(indent >= 0);
+    JS_ASSERT(indent >= 0);
 }
 #endif
 
 bool
 _callHook(JSDContext *jsdc, JSContext *cx, JSAbstractFramePtr frame, bool isConstructing,
           bool before, unsigned type, JSD_CallHookProc hook, void *hookData)
 {
     JSDScript*        jsdscript;
--- a/js/jsd/jsd_text.cpp
+++ b/js/jsd/jsd_text.cpp
@@ -10,18 +10,18 @@
 
 #include <ctype.h>
 #include "jsd.h"
 #include "jsprf.h"
 
 #ifdef DEBUG
 void JSD_ASSERT_VALID_SOURCE_TEXT(JSDSourceText* jsdsrc)
 {
-    MOZ_ASSERT(jsdsrc);
-    MOZ_ASSERT(jsdsrc->url);
+    JS_ASSERT(jsdsrc);
+    JS_ASSERT(jsdsrc->url);
 }
 #endif
 
 /***************************************************************************/
 /* XXX add notification */
 
 static void
 _clearText(JSDContext* jsdc, JSDSourceText* jsdsrc)
@@ -93,17 +93,17 @@ static JSDSourceText*
     jsdsrc->alterCount = jsdc->sourceAlterCount++ ;
             
     return jsdsrc;
 }
 
 static void
 _destroySource(JSDContext* jsdc, JSDSourceText* jsdsrc)
 {
-    MOZ_ASSERT(nullptr == jsdsrc->text);  /* must _clearText() first */
+    JS_ASSERT(nullptr == jsdsrc->text);  /* must _clearText() first */
     free(jsdsrc->url);
     free(jsdsrc);
 }
 
 static void
 _removeSource(JSDContext* jsdc, JSDSourceText* jsdsrc)
 {
     JS_REMOVE_LINK(&jsdsrc->links);
@@ -486,17 +486,17 @@ jsd_StartingEvalUsingFilename(JSDContext
     /* NOTE: We leave it locked! */
     JSD_LOCK_SOURCE_TEXT(jsdc); 
 
     jsdsrc = jsd_FindSourceForURL(jsdc, url);
     if(jsdsrc)
     {
 #if 0
 #ifndef JSD_LOWLEVEL_SOURCE
-        MOZ_ASSERT(! jsdsrc->doingEval);
+        JS_ASSERT(! jsdsrc->doingEval);
 #endif
 #endif
         jsdsrc->doingEval = true;
     }
 }    
 
 void
 jsd_FinishedEvalUsingFilename(JSDContext* jsdc, const char* url)
@@ -510,16 +510,16 @@ jsd_FinishedEvalUsingFilename(JSDContext
     {
 #if 0
 #ifndef JSD_LOWLEVEL_SOURCE
         /*
         * when using this low level source addition, this jsdsrc might 
         * not have existed before the eval, but does exist now (without
         * this flag set!)
         */
-        MOZ_ASSERT(jsdsrc->doingEval);
+        JS_ASSERT(jsdsrc->doingEval);
 #endif
 #endif
         jsdsrc->doingEval = false;
     }
 
     JSD_UNLOCK_SOURCE_TEXT(jsdc);
 }    
--- a/js/jsd/jsd_val.cpp
+++ b/js/jsd/jsd_val.cpp
@@ -14,50 +14,50 @@
 #include "jswrapper.h"
 #include "nsCxPusher.h"
 
 using mozilla::AutoSafeJSContext;
 
 #ifdef DEBUG
 void JSD_ASSERT_VALID_VALUE(JSDValue* jsdval)
 {
-    MOZ_ASSERT(jsdval);
-    MOZ_ASSERT(jsdval->nref > 0);
+    JS_ASSERT(jsdval);
+    JS_ASSERT(jsdval->nref > 0);
     if(!JS_CLIST_IS_EMPTY(&jsdval->props))
     {
-        MOZ_ASSERT(CHECK_BIT_FLAG(jsdval->flags, GOT_PROPS));
-        MOZ_ASSERT(!JSVAL_IS_PRIMITIVE(jsdval->val));
+        JS_ASSERT(CHECK_BIT_FLAG(jsdval->flags, GOT_PROPS));
+        JS_ASSERT(!JSVAL_IS_PRIMITIVE(jsdval->val));
     }
 
     if(jsdval->proto)
     {
-        MOZ_ASSERT(CHECK_BIT_FLAG(jsdval->flags, GOT_PROTO));
-        MOZ_ASSERT(jsdval->proto->nref > 0);
+        JS_ASSERT(CHECK_BIT_FLAG(jsdval->flags, GOT_PROTO));
+        JS_ASSERT(jsdval->proto->nref > 0);
     }
     if(jsdval->parent)
     {
-        MOZ_ASSERT(CHECK_BIT_FLAG(jsdval->flags, GOT_PARENT));
-        MOZ_ASSERT(jsdval->parent->nref > 0);
+        JS_ASSERT(CHECK_BIT_FLAG(jsdval->flags, GOT_PARENT));
+        JS_ASSERT(jsdval->parent->nref > 0);
     }
     if(jsdval->ctor)
     {
-        MOZ_ASSERT(CHECK_BIT_FLAG(jsdval->flags, GOT_CTOR));
-        MOZ_ASSERT(jsdval->ctor->nref > 0);
+        JS_ASSERT(CHECK_BIT_FLAG(jsdval->flags, GOT_CTOR));
+        JS_ASSERT(jsdval->ctor->nref > 0);
     }
 }
 
 void JSD_ASSERT_VALID_PROPERTY(JSDProperty* jsdprop)
 {
-    MOZ_ASSERT(jsdprop);
-    MOZ_ASSERT(jsdprop->name);
-    MOZ_ASSERT(jsdprop->name->nref > 0);
-    MOZ_ASSERT(jsdprop->val);
-    MOZ_ASSERT(jsdprop->val->nref > 0);
+    JS_ASSERT(jsdprop);
+    JS_ASSERT(jsdprop->name);
+    JS_ASSERT(jsdprop->name->nref > 0);
+    JS_ASSERT(jsdprop->val);
+    JS_ASSERT(jsdprop->val->nref > 0);
     if(jsdprop->alias)
-        MOZ_ASSERT(jsdprop->alias->nref > 0);
+        JS_ASSERT(jsdprop->alias->nref > 0);
 }
 #endif
 
 
 bool
 jsd_IsValueObject(JSDContext* jsdc, JSDValue* jsdval)
 {
     return !JSVAL_IS_PRIMITIVE(jsdval->val) || JSVAL_IS_NULL(jsdval->val);
@@ -128,17 +128,17 @@ jsd_IsValueNative(JSDContext* jsdc, JSDV
     if(jsd_IsValueFunction(jsdc, jsdval))
     {
         JSAutoCompartment ac(cx, JSVAL_TO_OBJECT(jsdval->val));
         AutoSaveExceptionState as(cx);
         bool ok = false;
         fun = JSD_GetValueFunction(jsdc, jsdval);
         if(fun)
             ok = JS_GetFunctionScript(cx, fun) ? false : true;
-        MOZ_ASSERT(fun);
+        JS_ASSERT(fun);
         return ok;
     }
     return !JSVAL_IS_PRIMITIVE(jsdval->val);
 }
 
 /***************************************************************************/
 
 bool
@@ -270,17 +270,17 @@ jsd_NewValue(JSDContext* jsdc, jsval val
     JS_INIT_CLIST(&jsdval->props);
 
     return jsdval;
 }
 
 void
 jsd_DropValue(JSDContext* jsdc, JSDValue* jsdval)
 {
-    MOZ_ASSERT(jsdval->nref > 0);
+    JS_ASSERT(jsdval->nref > 0);
     if(0 == --jsdval->nref)
     {
         jsd_RefreshValue(jsdc, jsdval);
         if(JSVAL_IS_GCTHING(jsdval->val))
         {
             AutoSafeJSContext cx;
             JSAutoCompartment ac(cx, jsdc->glob);
             JS_RemoveValueRoot(cx, &jsdval->val);
@@ -344,30 +344,30 @@ static void _freeProps(JSDContext* jsdc,
     JSDProperty* jsdprop;
 
     while(jsdprop = (JSDProperty*)jsdval->props.next,
           jsdprop != (JSDProperty*)&jsdval->props)
     {
         JS_REMOVE_AND_INIT_LINK(&jsdprop->links);
         jsd_DropProperty(jsdc, jsdprop);
     }
-    MOZ_ASSERT(JS_CLIST_IS_EMPTY(&jsdval->props));
+    JS_ASSERT(JS_CLIST_IS_EMPTY(&jsdval->props));
     CLEAR_BIT_FLAG(jsdval->flags, GOT_PROPS);
 }
 
 static bool _buildProps(JSDContext* jsdc, JSDValue* jsdval)
 {
     AutoSafeJSContext cx;
     JS::RootedObject obj(cx);
     JSPropertyDescArray pda;
     unsigned i;
 
-    MOZ_ASSERT(JS_CLIST_IS_EMPTY(&jsdval->props));
-    MOZ_ASSERT(!(CHECK_BIT_FLAG(jsdval->flags, GOT_PROPS)));
-    MOZ_ASSERT(!JSVAL_IS_PRIMITIVE(jsdval->val));
+    JS_ASSERT(JS_CLIST_IS_EMPTY(&jsdval->props));
+    JS_ASSERT(!(CHECK_BIT_FLAG(jsdval->flags, GOT_PROPS)));
+    JS_ASSERT(!JSVAL_IS_PRIMITIVE(jsdval->val));
 
     if(JSVAL_IS_PRIMITIVE(jsdval->val))
         return false;
 
     obj = JSVAL_TO_OBJECT(jsdval->val);
 
     JSAutoCompartment ac(cx, obj);
 
@@ -448,28 +448,28 @@ jsd_GetCountOfProperties(JSDContext* jsd
 }
 
 JSDProperty*
 jsd_IterateProperties(JSDContext* jsdc, JSDValue* jsdval, JSDProperty **iterp)
 {
     JSDProperty* jsdprop = *iterp;
     if(!(CHECK_BIT_FLAG(jsdval->flags, GOT_PROPS)))
     {
-        MOZ_ASSERT(!jsdprop);
+        JS_ASSERT(!jsdprop);
         if(!_buildProps(jsdc, jsdval))
             return nullptr;
     }
 
     if(!jsdprop)
         jsdprop = (JSDProperty*)jsdval->props.next;
     if(jsdprop == (JSDProperty*)&jsdval->props)
         return nullptr;
     *iterp = (JSDProperty*)jsdprop->links.next;
 
-    MOZ_ASSERT(jsdprop);
+    JS_ASSERT(jsdprop);
     jsdprop->nref++;
     return jsdprop;
 }
 
 JSDProperty*
 jsd_GetValueProperty(JSDContext* jsdc, JSDValue* jsdval, JSString* nameStr)
 {
     JS::RootedString name(jsdc->jsrt, nameStr);
@@ -581,17 +581,17 @@ jsd_GetValueFunction(JSDContext* jsdc, J
 JSDValue*
 jsd_GetValuePrototype(JSDContext* jsdc, JSDValue* jsdval)
 {
     AutoSafeJSContext cx;
     if(!(CHECK_BIT_FLAG(jsdval->flags, GOT_PROTO)))
     {
         JS::RootedObject obj(cx);
         JS::RootedObject proto(cx);
-        MOZ_ASSERT(!jsdval->proto);
+        JS_ASSERT(!jsdval->proto);
         SET_BIT_FLAG(jsdval->flags, GOT_PROTO);
         if(JSVAL_IS_PRIMITIVE(jsdval->val))
             return nullptr;
         obj = JSVAL_TO_OBJECT(jsdval->val);
         if(!JS_GetPrototype(cx, obj, &proto))
             return nullptr;
         if(!proto)
             return nullptr;
@@ -605,17 +605,17 @@ jsd_GetValuePrototype(JSDContext* jsdc, 
 JSDValue*
 jsd_GetValueParent(JSDContext* jsdc, JSDValue* jsdval)
 {
     if(!(CHECK_BIT_FLAG(jsdval->flags, GOT_PARENT)))
     {
         AutoSafeJSContext cx;
         JS::RootedObject obj(cx);
         JS::RootedObject parent(cx);
-        MOZ_ASSERT(!jsdval->parent);
+        JS_ASSERT(!jsdval->parent);
         SET_BIT_FLAG(jsdval->flags, GOT_PARENT);
         if(JSVAL_IS_PRIMITIVE(jsdval->val))
             return nullptr;
         obj = JSVAL_TO_OBJECT(jsdval->val);
         {
             JSAutoCompartment ac(cx, obj);
             parent = JS_GetParentOrScopeChain(cx, obj);
         }
@@ -632,17 +632,17 @@ JSDValue*
 jsd_GetValueConstructor(JSDContext* jsdc, JSDValue* jsdval)
 {
     if(!(CHECK_BIT_FLAG(jsdval->flags, GOT_CTOR)))
     {
         AutoSafeJSContext cx;
         JS::RootedObject obj(cx);
         JS::RootedObject proto(cx);
         JS::RootedObject ctor(cx);
-        MOZ_ASSERT(!jsdval->ctor);
+        JS_ASSERT(!jsdval->ctor);
         SET_BIT_FLAG(jsdval->flags, GOT_CTOR);
         if(JSVAL_IS_PRIMITIVE(jsdval->val))
             return nullptr;
         obj = JSVAL_TO_OBJECT(jsdval->val);
         if(!JS_GetPrototype(cx, obj, &proto))
             return nullptr;
         if(!proto)
             return nullptr;
@@ -732,18 +732,18 @@ unsigned
 jsd_GetPropertyFlags(JSDContext* jsdc, JSDProperty* jsdprop)
 {
     return jsdprop->flags;
 }
 
 void
 jsd_DropProperty(JSDContext* jsdc, JSDProperty* jsdprop)
 {
-    MOZ_ASSERT(jsdprop->nref > 0);
+    JS_ASSERT(jsdprop->nref > 0);
     if(0 == --jsdprop->nref)
     {
-        MOZ_ASSERT(JS_CLIST_IS_EMPTY(&jsdprop->links));
+        JS_ASSERT(JS_CLIST_IS_EMPTY(&jsdprop->links));
         DROP_CLEAR_VALUE(jsdc, jsdprop->val);
         DROP_CLEAR_VALUE(jsdc, jsdprop->name);
         DROP_CLEAR_VALUE(jsdc, jsdprop->alias);
         free(jsdprop);
     }
 }
--- a/js/jsd/jsdebug.cpp
+++ b/js/jsd/jsdebug.cpp
@@ -385,17 +385,17 @@ JSD_IterateSources(JSDContext* jsdc, JSD
     JSD_ASSERT_VALID_CONTEXT(jsdc);
     return jsd_IterateSources(jsdc, iterp);
 }
 
 JSD_PUBLIC_API(JSDSourceText*)
 JSD_FindSourceForURL(JSDContext* jsdc, const char* url)
 {
     JSD_ASSERT_VALID_CONTEXT(jsdc);
-    MOZ_ASSERT(url);
+    JS_ASSERT(url);
     return jsd_FindSourceForURL(jsdc, url);
 }
 
 JSD_PUBLIC_API(const char*)
 JSD_GetSourceURL(JSDContext* jsdc, JSDSourceText* jsdsrc)
 {
     JSD_ASSERT_VALID_CONTEXT(jsdc);
     JSD_ASSERT_VALID_SOURCE_TEXT(jsdsrc);
@@ -403,18 +403,18 @@ JSD_GetSourceURL(JSDContext* jsdc, JSDSo
 }
 
 JSD_PUBLIC_API(bool)
 JSD_GetSourceText(JSDContext* jsdc, JSDSourceText* jsdsrc,
                   const char** ppBuf, int* pLen)
 {
     JSD_ASSERT_VALID_CONTEXT(jsdc);
     JSD_ASSERT_VALID_SOURCE_TEXT(jsdsrc);
-    MOZ_ASSERT(ppBuf);
-    MOZ_ASSERT(pLen);
+    JS_ASSERT(ppBuf);
+    JS_ASSERT(pLen);
     return jsd_GetSourceText(jsdc, jsdsrc, ppBuf, pLen);
 }
 
 JSD_PUBLIC_API(void)
 JSD_ClearSourceText(JSDContext* jsdc, JSDSourceText* jsdsrc)
 {
     JSD_ASSERT_VALID_CONTEXT(jsdc);
     JSD_ASSERT_VALID_SOURCE_TEXT(jsdsrc);
@@ -468,17 +468,17 @@ JSD_DestroyAllSources( JSDContext* jsdc 
     JSD_ASSERT_VALID_CONTEXT(jsdc);
     jsd_DestroyAllSources(jsdc);
 }
 
 JSD_PUBLIC_API(JSDSourceText*)
 JSD_NewSourceText(JSDContext* jsdc, const char* url)
 {
     JSD_ASSERT_VALID_CONTEXT(jsdc);
-    MOZ_ASSERT(url);
+    JS_ASSERT(url);
     return jsd_NewSourceText(jsdc, url);
 }
 
 JSD_PUBLIC_API(JSDSourceText*)
 JSD_AppendSourceText(JSDContext* jsdc,
                      JSDSourceText* jsdsrc,
                      const char* text,       /* *not* zero terminated */
                      size_t length,
@@ -503,17 +503,17 @@ JSD_AppendUCSourceText(JSDContext*     j
 
 JSD_PUBLIC_API(bool)
 JSD_AddFullSourceText(JSDContext* jsdc,
                       const char* text,       /* *not* zero terminated */
                       size_t      length,
                       const char* url)
 {
     JSD_ASSERT_VALID_CONTEXT(jsdc);
-    MOZ_ASSERT(url);
+    JS_ASSERT(url);
     return jsd_AddFullSourceText(jsdc, text, length, url);
 }
 
 /***************************************************************************/
 /* Execution/Interrupt Hook functions */
 
 JSD_PUBLIC_API(bool)
 JSD_SetExecutionHook(JSDContext*           jsdc,
@@ -764,71 +764,71 @@ JSD_IsStackFrameConstructing(JSDContext*
 JSD_PUBLIC_API(bool)
 JSD_EvaluateUCScriptInStackFrame(JSDContext* jsdc,
                                  JSDThreadState* jsdthreadstate,
                                  JSDStackFrameInfo* jsdframe,
                                  const jschar *bytes, unsigned length,
                                  const char *filename, unsigned lineno, JS::MutableHandleValue rval)
 {
     JSD_ASSERT_VALID_CONTEXT(jsdc);
-    MOZ_ASSERT(bytes);
-    MOZ_ASSERT(length);
-    MOZ_ASSERT(filename);
+    JS_ASSERT(bytes);
+    JS_ASSERT(length);
+    JS_ASSERT(filename);
 
     return jsd_EvaluateUCScriptInStackFrame(jsdc, jsdthreadstate,jsdframe,
                                             bytes, length, filename, lineno,
                                             true, rval);
 }
 
 JSD_PUBLIC_API(bool)
 JSD_AttemptUCScriptInStackFrame(JSDContext* jsdc,
                                 JSDThreadState* jsdthreadstate,
                                 JSDStackFrameInfo* jsdframe,
                                 const jschar *bytes, unsigned length,
                                 const char *filename, unsigned lineno,
                                 JS::MutableHandleValue rval)
 {
     JSD_ASSERT_VALID_CONTEXT(jsdc);
-    MOZ_ASSERT(bytes);
-    MOZ_ASSERT(length);
-    MOZ_ASSERT(filename);
+    JS_ASSERT(bytes);
+    JS_ASSERT(length);
+    JS_ASSERT(filename);
 
     return jsd_EvaluateUCScriptInStackFrame(jsdc, jsdthreadstate,jsdframe,
                                             bytes, length, filename, lineno,
                                             false, rval);
 }
 
 JSD_PUBLIC_API(bool)
 JSD_EvaluateScriptInStackFrame(JSDContext* jsdc,
                                JSDThreadState* jsdthreadstate,
                                JSDStackFrameInfo* jsdframe,
                                const char *bytes, unsigned length,
                                const char *filename, unsigned lineno, JS::MutableHandleValue rval)
 {
     JSD_ASSERT_VALID_CONTEXT(jsdc);
-    MOZ_ASSERT(bytes);
-    MOZ_ASSERT(length);
-    MOZ_ASSERT(filename);
+    JS_ASSERT(bytes);
+    JS_ASSERT(length);
+    JS_ASSERT(filename);
 
     return jsd_EvaluateScriptInStackFrame(jsdc, jsdthreadstate,jsdframe,
                                           bytes, length,
                                           filename, lineno, true, rval);
 }
 
 JSD_PUBLIC_API(bool)
 JSD_AttemptScriptInStackFrame(JSDContext* jsdc,
                               JSDThreadState* jsdthreadstate,
                               JSDStackFrameInfo* jsdframe,
                               const char *bytes, unsigned length,
                               const char *filename, unsigned lineno, JS::MutableHandleValue rval)
 {
     JSD_ASSERT_VALID_CONTEXT(jsdc);
-    MOZ_ASSERT(bytes);
-    MOZ_ASSERT(length);
-    MOZ_ASSERT(filename);
+    JS_ASSERT(bytes);
+    JS_ASSERT(length);
+    JS_ASSERT(filename);
 
     return jsd_EvaluateScriptInStackFrame(jsdc, jsdthreadstate,jsdframe,
                                           bytes, length,
                                           filename, lineno, false, rval);
 }
 
 JSD_PUBLIC_API(JSString*)
 JSD_ValToStringInStackFrame(JSDContext* jsdc,
@@ -1123,26 +1123,26 @@ JSD_GetCountOfProperties(JSDContext* jsd
     return jsd_GetCountOfProperties(jsdc, jsdval);
 }
 
 JSD_PUBLIC_API(JSDProperty*)
 JSD_IterateProperties(JSDContext* jsdc, JSDValue* jsdval, JSDProperty **iterp)
 {
     JSD_ASSERT_VALID_CONTEXT(jsdc);
     JSD_ASSERT_VALID_VALUE(jsdval);
-    MOZ_ASSERT(iterp);
+    JS_ASSERT(iterp);
     return jsd_IterateProperties(jsdc, jsdval, iterp);
 }
 
 JSD_PUBLIC_API(JSDProperty*)
 JSD_GetValueProperty(JSDContext* jsdc, JSDValue* jsdval, JSString* name)
 {
     JSD_ASSERT_VALID_CONTEXT(jsdc);
     JSD_ASSERT_VALID_VALUE(jsdval);
-    MOZ_ASSERT(name);
+    JS_ASSERT(name);
     return jsd_GetValueProperty(jsdc, jsdval, name);
 }
 
 JSD_PUBLIC_API(JSDValue*)
 JSD_GetValuePrototype(JSDContext* jsdc, JSDValue* jsdval)
 {
     JSD_ASSERT_VALID_CONTEXT(jsdc);
     JSD_ASSERT_VALID_VALUE(jsdval);
@@ -1294,17 +1294,17 @@ JSD_GetObjectConstructorName(JSDContext*
     JSD_ASSERT_VALID_OBJECT(jsdobj);
     return jsd_GetObjectConstructorName(jsdc, jsdobj);
 }
 
 JSD_PUBLIC_API(JSDObject*)
 JSD_GetJSDObjectForJSObject(JSDContext* jsdc, JSObject* jsobj)
 {
     JSD_ASSERT_VALID_CONTEXT(jsdc);
-    MOZ_ASSERT(jsobj);
+    JS_ASSERT(jsobj);
     return jsd_GetJSDObjectForJSObject(jsdc, jsobj);
 }
 
 JSD_PUBLIC_API(JSDObject*)
 JSD_GetObjectForValue(JSDContext* jsdc, JSDValue* jsdval)
 {
     JSD_ASSERT_VALID_CONTEXT(jsdc);
     JSD_ASSERT_VALID_VALUE(jsdval);
--- a/js/jsd/jshash.cpp
+++ b/js/jsd/jshash.cpp
@@ -171,17 +171,17 @@ JS_HashTableRawLookup(JSHashTable *ht, J
 
 static bool
 Resize(JSHashTable *ht, uint32_t newshift)
 {
     size_t nb, nentries, i;
     JSHashEntry **oldbuckets, *he, *next, **hep;
     size_t nold = NBUCKETS(ht);
 
-    MOZ_ASSERT(newshift < JS_HASH_BITS);
+    JS_ASSERT(newshift < JS_HASH_BITS);
 
     nb = (size_t)1 << (JS_HASH_BITS - newshift);
 
     /* Integer overflow protection. */
     if (nb > (size_t)-1 / sizeof(JSHashEntry*))
         return false;
     nb *= sizeof(JSHashEntry*);
 
@@ -193,17 +193,17 @@ Resize(JSHashTable *ht, uint32_t newshif
     }
     memset(ht->buckets, 0, nb);
 
     ht->shift = newshift;
     nentries = ht->nentries;
 
     for (i = 0; nentries != 0; i++) {
         for (he = oldbuckets[i]; he; he = next) {
-            MOZ_ASSERT(nentries != 0);
+            JS_ASSERT(nentries != 0);
             --nentries;
             next = he->next;
             hep = BUCKET_HEAD(ht, he->keyHash);
 
             /*
              * We do not require unique entries, instead appending he to the
              * chain starting at hep.
              */
@@ -334,17 +334,17 @@ JS_HashTableEnumerateEntries(JSHashTable
     uint32_t nlimit, n, nbuckets, newlog2;
     int rv;
 
     nlimit = ht->nentries;
     n = 0;
     for (bucket = ht->buckets; n != nlimit; ++bucket) {
         hep = bucket;
         while ((he = *hep) != nullptr) {
-            MOZ_ASSERT(n < nlimit);
+            JS_ASSERT(n < nlimit);
             rv = f(he, n, arg);
             n++;
             if (rv & HT_ENUMERATE_REMOVE) {
                 *hep = he->next;
                 ht->allocOps->freeEntry(ht->allocPriv, he, HT_FREE_ENTRY);
                 --ht->nentries;
             } else {
                 hep = &he->next;
@@ -353,25 +353,25 @@ JS_HashTableEnumerateEntries(JSHashTable
                 goto out;
             }
         }
     }
 
 out:
     /* Shrink table if removal of entries made it underloaded */
     if (ht->nentries != nlimit) {
-        MOZ_ASSERT(ht->nentries < nlimit);
+        JS_ASSERT(ht->nentries < nlimit);
         nbuckets = NBUCKETS(ht);
         if (MINBUCKETS < nbuckets && ht->nentries < UNDERLOADED(nbuckets)) {
             newlog2 = CeilingLog2Size(ht->nentries);
             if (newlog2 < MINBUCKETSLOG2)
                 newlog2 = MINBUCKETSLOG2;
 
             /*  Check that we really shrink the table. */
-            MOZ_ASSERT(JS_HASH_BITS - ht->shift > newlog2);
+            JS_ASSERT(JS_HASH_BITS - ht->shift > newlog2);
             Resize(ht, JS_HASH_BITS - newlog2);
         }
     }
     return (int)n;
 }
 
 #ifdef JS_HASHMETER
 #include <stdio.h>
--- a/js/public/CharacterEncoding.h
+++ b/js/public/CharacterEncoding.h
@@ -45,23 +45,23 @@ class Latin1CharsZ : public mozilla::Ran
     typedef mozilla::RangedPtr<unsigned char> Base;
 
   public:
     Latin1CharsZ() : Base(nullptr, 0) {}
 
     Latin1CharsZ(char *aBytes, size_t aLength)
       : Base(reinterpret_cast<unsigned char *>(aBytes), aLength)
     {
-        MOZ_ASSERT(aBytes[aLength] == '\0');
+        JS_ASSERT(aBytes[aLength] == '\0');
     }
 
     Latin1CharsZ(unsigned char *aBytes, size_t aLength)
       : Base(aBytes, aLength)
     {
-        MOZ_ASSERT(aBytes[aLength] == '\0');
+        JS_ASSERT(aBytes[aLength] == '\0');
     }
 
     using Base::operator=;
 
     char *c_str() { return reinterpret_cast<char *>(get()); }
 };
 
 class UTF8Chars : public mozilla::Range<unsigned char>
@@ -86,23 +86,23 @@ class UTF8CharsZ : public mozilla::Range
     typedef mozilla::RangedPtr<unsigned char> Base;
 
   public:
     UTF8CharsZ() : Base(nullptr, 0) {}
 
     UTF8CharsZ(char *aBytes, size_t aLength)
       : Base(reinterpret_cast<unsigned char *>(aBytes), aLength)
     {
-        MOZ_ASSERT(aBytes[aLength] == '\0');
+        JS_ASSERT(aBytes[aLength] == '\0');
     }
 
     UTF8CharsZ(unsigned char *aBytes, size_t aLength)
       : Base(aBytes, aLength)
     {
-        MOZ_ASSERT(aBytes[aLength] == '\0');
+        JS_ASSERT(aBytes[aLength] == '\0');
     }
 
     using Base::operator=;
 
     char *c_str() { return reinterpret_cast<char *>(get()); }
 };
 
 /*
@@ -131,17 +131,17 @@ class TwoByteCharsZ : public mozilla::Ra
     typedef mozilla::RangedPtr<jschar> Base;
 
   public:
     TwoByteCharsZ() : Base(nullptr, 0) {}
 
     TwoByteCharsZ(jschar *chars, size_t length)
       : Base(chars, length)
     {
-        MOZ_ASSERT(chars[length] == '\0');
+        JS_ASSERT(chars[length] == '\0');
     }
 
     using Base::operator=;
 };
 
 typedef mozilla::RangedPtr<const jschar> ConstCharPtr;
 
 /*
--- a/js/public/Class.h
+++ b/js/public/Class.h
@@ -71,80 +71,80 @@ class SpecialId
   public:
     SpecialId() : bits_(TYPE_VOID) { }
 
     /* Object-valued */
 
     SpecialId(JSObject &obj)
       : bits_(uintptr_t(&obj) | TYPE_OBJECT)
     {
-        MOZ_ASSERT(&obj != nullptr);
-        MOZ_ASSERT((uintptr_t(&obj) & TYPE_MASK) == 0);
+        JS_ASSERT(&obj != nullptr);
+        JS_ASSERT((uintptr_t(&obj) & TYPE_MASK) == 0);
     }
 
     bool isObject() const {
         return (bits_ & TYPE_MASK) == TYPE_OBJECT && bits_ != TYPE_OBJECT;
     }
 
     JSObject *toObject() const {
-        MOZ_ASSERT(isObject());
+        JS_ASSERT(isObject());
         return reinterpret_cast<JSObject *>(bits_ & ~TYPE_MASK);
     }
 
     /* Empty */
 
     static SpecialId empty() {
         SpecialId sid(TYPE_OBJECT);
-        MOZ_ASSERT(sid.isEmpty());
+        JS_ASSERT(sid.isEmpty());
         return sid;
     }
 
     bool isEmpty() const {
         return bits_ == TYPE_OBJECT;
     }
 
     /* Void */
 
     static SpecialId voidId() {
         SpecialId sid(TYPE_VOID);
-        MOZ_ASSERT(sid.isVoid());
+        JS_ASSERT(sid.isVoid());
         return sid;
     }
 
     bool isVoid() const {
         return bits_ == TYPE_VOID;
     }
 };
 
 static MOZ_ALWAYS_INLINE jsid
 SPECIALID_TO_JSID(const SpecialId &sid)
 {
     jsid id;
     JSID_BITS(id) = sid.bits_;
-    MOZ_ASSERT_IF(sid.isObject(), JSID_IS_OBJECT(id) && JSID_TO_OBJECT(id) == sid.toObject());
-    MOZ_ASSERT_IF(sid.isVoid(), JSID_IS_VOID(id));
-    MOZ_ASSERT_IF(sid.isEmpty(), JSID_IS_EMPTY(id));
+    JS_ASSERT_IF(sid.isObject(), JSID_IS_OBJECT(id) && JSID_TO_OBJECT(id) == sid.toObject());
+    JS_ASSERT_IF(sid.isVoid(), JSID_IS_VOID(id));
+    JS_ASSERT_IF(sid.isEmpty(), JSID_IS_EMPTY(id));
     return id;
 }
 
 static MOZ_ALWAYS_INLINE bool
 JSID_IS_SPECIAL(jsid id)
 {
     return JSID_IS_OBJECT(id) || JSID_IS_EMPTY(id) || JSID_IS_VOID(id);
 }
 
 static MOZ_ALWAYS_INLINE SpecialId
 JSID_TO_SPECIALID(jsid id)
 {
-    MOZ_ASSERT(JSID_IS_SPECIAL(id));
+    JS_ASSERT(JSID_IS_SPECIAL(id));
     if (JSID_IS_OBJECT(id))
         return SpecialId(*JSID_TO_OBJECT(id));
     if (JSID_IS_EMPTY(id))
         return SpecialId::empty();
-    MOZ_ASSERT(JSID_IS_VOID(id));
+    JS_ASSERT(JSID_IS_VOID(id));
     return SpecialId::voidId();
 }
 
 typedef JS::Handle<SpecialId> HandleSpecialId;
 
 } // namespace js
 
 // JSClass operation signatures.
--- a/js/public/GCAPI.h
+++ b/js/public/GCAPI.h
@@ -383,17 +383,17 @@ class JS_PUBLIC_API(ObjectPtr)
     Heap<JSObject *> value;
 
   public:
     ObjectPtr() : value(nullptr) {}
 
     ObjectPtr(JSObject *obj) : value(obj) {}
 
     /* Always call finalize before the destructor. */
-    ~ObjectPtr() { MOZ_ASSERT(!value); }
+    ~ObjectPtr() { JS_ASSERT(!value); }
 
     void finalize(JSRuntime *rt) {
         if (IsIncrementalBarrierNeeded(rt))
             IncrementalObjectBarrier(value);
         value = nullptr;
     }
 
     void init(JSObject *obj) { value = obj; }
@@ -430,17 +430,17 @@ UnmarkGrayGCThingRecursively(void *thing
  * This should be called when an object that is marked gray is exposed to the JS
  * engine (by handing it to running JS code or writing it into live JS
  * data). During incremental GC, since the gray bits haven't been computed yet,
  * we conservatively mark the object black.
  */
 static MOZ_ALWAYS_INLINE void
 ExposeGCThingToActiveJS(void *thing, JSGCTraceKind kind)
 {
-    MOZ_ASSERT(kind != JSTRACE_SHAPE);
+    JS_ASSERT(kind != JSTRACE_SHAPE);
 
     shadow::Runtime *rt = js::gc::GetGCThingRuntime(thing);
 #ifdef JSGC_GENERATIONAL
     /*
      * GC things residing in the nursery cannot be gray: they have no mark bits.
      * All live objects in the nursery are moved to tenured at the beginning of
      * each GC slice, so the gray marker never sees nursery things.
      */
--- a/js/public/HashTable.h
+++ b/js/public/HashTable.h
@@ -526,29 +526,29 @@ class HashSet
 
 // Pointer hashing policy that strips the lowest zeroBits when calculating the
 // hash to improve key distribution.
 template <typename Key, size_t zeroBits>
 struct PointerHasher
 {
     typedef Key Lookup;
     static HashNumber hash(const Lookup &l) {
-        MOZ_ASSERT(!JS::IsPoisonedPtr(l));
+        JS_ASSERT(!JS::IsPoisonedPtr(l));
         size_t word = reinterpret_cast<size_t>(l) >> zeroBits;
         JS_STATIC_ASSERT(sizeof(HashNumber) == 4);
 #if JS_BITS_PER_WORD == 32
         return HashNumber(word);
 #else
         JS_STATIC_ASSERT(sizeof word == 8);
         return HashNumber((word >> 32) ^ word);
 #endif
     }
     static bool match(const Key &k, const Lookup &l) {
-        MOZ_ASSERT(!JS::IsPoisonedPtr(k));
-        MOZ_ASSERT(!JS::IsPoisonedPtr(l));
+        JS_ASSERT(!JS::IsPoisonedPtr(k));
+        JS_ASSERT(!JS::IsPoisonedPtr(l));
         return k == l;
     }
     static void rekey(Key &k, const Key& newKey) {
         k = newKey;
     }
 };
 
 // Default hash policy: just use the 'lookup' value. This of course only
@@ -696,47 +696,47 @@ class HashTableEntry
     // NB: HashTableEntry is treated as a POD: no constructor or destructor calls.
 
     void destroyIfLive() {
         if (isLive())
             mem.addr()->~T();
     }
 
     void destroy() {
-        MOZ_ASSERT(isLive());
+        JS_ASSERT(isLive());
         mem.addr()->~T();
     }
 
     void swap(HashTableEntry *other) {
         mozilla::Swap(keyHash, other->keyHash);
         mozilla::Swap(mem, other->mem);
     }
 
-    T &get() { MOZ_ASSERT(isLive()); return *mem.addr(); }
+    T &get() { JS_ASSERT(isLive()); return *mem.addr(); }
 
     bool isFree() const    { return keyHash == sFreeKey; }
-    void clearLive()       { MOZ_ASSERT(isLive()); keyHash = sFreeKey; mem.addr()->~T(); }
+    void clearLive()       { JS_ASSERT(isLive()); keyHash = sFreeKey; mem.addr()->~T(); }
     void clear()           { if (isLive()) mem.addr()->~T(); keyHash = sFreeKey; }
     bool isRemoved() const { return keyHash == sRemovedKey; }
-    void removeLive()      { MOZ_ASSERT(isLive()); keyHash = sRemovedKey; mem.addr()->~T(); }
+    void removeLive()      { JS_ASSERT(isLive()); keyHash = sRemovedKey; mem.addr()->~T(); }
     bool isLive() const    { return isLiveHash(keyHash); }
-    void setCollision()               { MOZ_ASSERT(isLive()); keyHash |= sCollisionBit; }
-    void setCollision(HashNumber bit) { MOZ_ASSERT(isLive()); keyHash |= bit; }
+    void setCollision()               { JS_ASSERT(isLive()); keyHash |= sCollisionBit; }
+    void setCollision(HashNumber bit) { JS_ASSERT(isLive()); keyHash |= bit; }
     void unsetCollision()             { keyHash &= ~sCollisionBit; }
     bool hasCollision() const         { return keyHash & sCollisionBit; }
     bool matchHash(HashNumber hn)     { return (keyHash & ~sCollisionBit) == hn; }
     HashNumber getKeyHash() const     { return keyHash & ~sCollisionBit; }
 
     template <class U>
     void setLive(HashNumber hn, U &&u)
     {
-        MOZ_ASSERT(!isLive());
+        JS_ASSERT(!isLive());
         keyHash = hn;
         new(mem.addr()) T(mozilla::Forward<U>(u));
-        MOZ_ASSERT(isLive());
+        JS_ASSERT(isLive());
     }
 };
 
 template <class T, class HashPolicy, class AllocPolicy>
 class HashTable : private AllocPolicy
 {
     typedef typename mozilla::RemoveConst<T>::Type NonConstT;
     typedef typename HashPolicy::KeyType Key;
@@ -774,41 +774,41 @@ class HashTable : private AllocPolicy
         // Leaves Ptr uninitialized.
         Ptr() {
 #ifdef JS_DEBUG
             entry_ = (Entry *)0xbad;
 #endif
         }
 
         bool found() const {
-            MOZ_ASSERT(generation == table_->generation());
+            JS_ASSERT(generation == table_->generation());
             return entry_->isLive();
         }
 
         operator ConvertibleToBool() const {
             return found() ? &Ptr::nonNull : 0;
         }
 
         bool operator==(const Ptr &rhs) const {
-            MOZ_ASSERT(found() && rhs.found());
+            JS_ASSERT(found() && rhs.found());
             return entry_ == rhs.entry_;
         }
 
         bool operator!=(const Ptr &rhs) const {
-            MOZ_ASSERT(generation == table_->generation());
+            JS_ASSERT(generation == table_->generation());
             return !(*this == rhs);
         }
 
         T &operator*() const {
-            MOZ_ASSERT(generation == table_->generation());
+            JS_ASSERT(generation == table_->generation());
             return entry_->get();
         }
 
         T *operator->() const {
-            MOZ_ASSERT(generation == table_->generation());
+            JS_ASSERT(generation == table_->generation());
             return &entry_->get();
         }
     };
 
     // A Ptr that can be used to add a key after a failed lookup.
     class AddPtr : public Ptr
     {
         friend class HashTable;
@@ -863,33 +863,33 @@ class HashTable : private AllocPolicy
           , table_(nullptr)
           , mutationCount(0)
           , generation(0)
           , validEntry(false)
 #endif
         {}
 
         bool empty() const {
-            MOZ_ASSERT(generation == table_->generation());
-            MOZ_ASSERT(mutationCount == table_->mutationCount);
+            JS_ASSERT(generation == table_->generation());
+            JS_ASSERT(mutationCount == table_->mutationCount);
             return cur == end;
         }
 
         T &front() const {
-            MOZ_ASSERT(validEntry);
-            MOZ_ASSERT(!empty());
-            MOZ_ASSERT(generation == table_->generation());
-            MOZ_ASSERT(mutationCount == table_->mutationCount);
+            JS_ASSERT(validEntry);
+            JS_ASSERT(!empty());
+            JS_ASSERT(generation == table_->generation());
+            JS_ASSERT(mutationCount == table_->mutationCount);
             return cur->get();
         }
 
         void popFront() {
-            MOZ_ASSERT(!empty());
-            MOZ_ASSERT(generation == table_->generation());
-            MOZ_ASSERT(mutationCount == table_->mutationCount);
+            JS_ASSERT(!empty());
+            JS_ASSERT(generation == table_->generation());
+            JS_ASSERT(mutationCount == table_->mutationCount);
             while (++cur < end && !cur->isLive())
                 continue;
 #ifdef DEBUG
             validEntry = true;
 #endif
         }
     };
 
@@ -1073,17 +1073,17 @@ class HashTable : private AllocPolicy
         removedCount(0),
         table(nullptr),
         entered(false),
         mutationCount(0)
     {}
 
     MOZ_WARN_UNUSED_RESULT bool init(uint32_t length)
     {
-        MOZ_ASSERT(!initialized());
+        JS_ASSERT(!initialized());
 
         // Reject all lengths whose initial computed capacity would exceed
         // sMaxCapacity.  Round that maximum length down to the nearest power
         // of two for speedier code.
         if (length > sMaxInit) {
             this->reportAllocOverflow();
             return false;
         }
@@ -1183,20 +1183,20 @@ class HashTable : private AllocPolicy
 
     static bool match(Entry &e, const Lookup &l)
     {
         return HashPolicy::match(HashPolicy::getKey(e.get()), l);
     }
 
     Entry &lookup(const Lookup &l, HashNumber keyHash, unsigned collisionBit) const
     {
-        MOZ_ASSERT(isLiveHash(keyHash));
-        MOZ_ASSERT(!(keyHash & sCollisionBit));
-        MOZ_ASSERT(collisionBit == 0 || collisionBit == sCollisionBit);
-        MOZ_ASSERT(table);
+        JS_ASSERT(isLiveHash(keyHash));
+        JS_ASSERT(!(keyHash & sCollisionBit));
+        JS_ASSERT(collisionBit == 0 || collisionBit == sCollisionBit);
+        JS_ASSERT(table);
         METER(stats.searches++);
 
         // Compute the primary hash address.
         HashNumber h1 = hash1(keyHash);
         Entry *entry = &table[h1];
 
         // Miss: return space for a new entry.
         if (entry->isFree()) {
@@ -1243,18 +1243,18 @@ class HashTable : private AllocPolicy
     // This is a copy of lookup hardcoded to the assumptions:
     //   1. the lookup is a lookupForAdd
     //   2. the key, whose |keyHash| has been passed is not in the table,
     //   3. no entries have been removed from the table.
     // This specialized search avoids the need for recovering lookup values
     // from entries, which allows more flexible Lookup/Key types.
     Entry &findFreeEntry(HashNumber keyHash)
     {
-        MOZ_ASSERT(!(keyHash & sCollisionBit));
-        MOZ_ASSERT(table);
+        JS_ASSERT(!(keyHash & sCollisionBit));
+        JS_ASSERT(table);
         METER(stats.searches++);
 
         // We assume 'keyHash' has already been distributed.
 
         // Compute the primary hash address.
         HashNumber h1 = hash1(keyHash);
         Entry *entry = &table[h1];
 
@@ -1263,17 +1263,17 @@ class HashTable : private AllocPolicy
             METER(stats.misses++);
             return *entry;
         }
 
         // Collision: double hash.
         DoubleHash dh = hash2(keyHash);
 
         while(true) {
-            MOZ_ASSERT(!entry->isRemoved());
+            JS_ASSERT(!entry->isRemoved());
             entry->setCollision();
 
             METER(stats.steps++);
             h1 = applyDoubleHash(h1, dh);
 
             entry = &table[h1];
             if (!entry->isLive()) {
                 METER(stats.misses++);
@@ -1344,17 +1344,17 @@ class HashTable : private AllocPolicy
         if (overloaded()) {
             if (checkOverloaded() == RehashFailed)
                 rehashTableInPlace();
         }
     }
 
     void remove(Entry &e)
     {
-        MOZ_ASSERT(table);
+        JS_ASSERT(table);
         METER(stats.removes++);
 
         if (e.hasCollision()) {
             e.removeLive();
             removedCount++;
         } else {
             METER(stats.removeFrees++);
             e.clearLive();
@@ -1443,56 +1443,56 @@ class HashTable : private AllocPolicy
         }
         removedCount = 0;
         entryCount = 0;
         mutationCount++;
     }
 
     void finish()
     {
-        MOZ_ASSERT(!entered);
+        JS_ASSERT(!entered);
 
         if (!table)
             return;
 
         destroyTable(*this, table, capacity());
         table = nullptr;
         gen++;
         entryCount = 0;
         removedCount = 0;
         mutationCount++;
     }
 
     Range all() const
     {
-        MOZ_ASSERT(table);
+        JS_ASSERT(table);
         return Range(*this, table, table + capacity());
     }
 
     bool empty() const
     {
-        MOZ_ASSERT(table);
+        JS_ASSERT(table);
         return !entryCount;
     }
 
     uint32_t count() const
     {
-        MOZ_ASSERT(table);
+        JS_ASSERT(table);
         return entryCount;
     }
 
     uint32_t capacity() const
     {
-        MOZ_ASSERT(table);
+        JS_ASSERT(table);
         return JS_BIT(sHashBits - hashShift);
     }
 
     uint32_t generation() const
     {
-        MOZ_ASSERT(table);
+        JS_ASSERT(table);
         return gen;
     }
 
     size_t sizeOfExcludingThis(mozilla::MallocSizeOf mallocSizeOf) const
     {
         return mallocSizeOf(table);
     }
 
@@ -1522,19 +1522,19 @@ class HashTable : private AllocPolicy
         AddPtr p(entry, *this, keyHash);
         return p;
     }
 
     template <class U>
     bool add(AddPtr &p, U &&u)
     {
         mozilla::ReentrancyGuard g(*this);
-        MOZ_ASSERT(table);
-        MOZ_ASSERT(!p.found());
-        MOZ_ASSERT(!(p.keyHash & sCollisionBit));
+        JS_ASSERT(table);
+        JS_ASSERT(!p.found());
+        JS_ASSERT(!(p.keyHash & sCollisionBit));
 
         // Changing an entry from removed to live does not affect whether we
         // are overloaded and can be handled separately.
         if (p.entry_->isRemoved()) {
             METER(stats.addOverRemoved++);
             removedCount--;
             p.keyHash |= sCollisionBit;
         } else {
@@ -1556,17 +1556,17 @@ class HashTable : private AllocPolicy
         return true;
     }
 
     // Note: |l| may be a reference to a piece of |u|, so this function
     // must take care not to use |l| after moving |u|.
     template <class U>
     void putNewInfallible(const Lookup &l, U &&u)
     {
-        MOZ_ASSERT(table);
+        JS_ASSERT(table);
 
         HashNumber keyHash = prepareHash(l);
         Entry *entry = &findFreeEntry(keyHash);
 
         if (entry->isRemoved()) {
             METER(stats.addOverRemoved++);
             removedCount--;
             keyHash |= sCollisionBit;
@@ -1595,36 +1595,36 @@ class HashTable : private AllocPolicy
     bool relookupOrAdd(AddPtr& p, const Lookup &l, U &&u)
     {
 #ifdef DEBUG
         p.generation = generation();
         p.mutationCount = mutationCount;
 #endif
         {
             mozilla::ReentrancyGuard g(*this);
-            MOZ_ASSERT(prepareHash(l) == p.keyHash); // l has not been destroyed
+            JS_ASSERT(prepareHash(l) == p.keyHash); // l has not been destroyed
             p.entry_ = &lookup(l, p.keyHash, sCollisionBit);
         }
         return p.found() || add(p, mozilla::Forward<U>(u));
     }
 
     void remove(Ptr p)
     {
-        MOZ_ASSERT(table);
+        JS_ASSERT(table);
         mozilla::ReentrancyGuard g(*this);
-        MOZ_ASSERT(p.found());
+        JS_ASSERT(p.found());
         remove(*p.entry_);
         checkUnderloaded();
     }
 
     void rekeyWithoutRehash(Ptr p, const Lookup &l, const Key &k)
     {
-        MOZ_ASSERT(table);
+        JS_ASSERT(table);
         mozilla::ReentrancyGuard g(*this);
-        MOZ_ASSERT(p.found());
+        JS_ASSERT(p.found());
         typename HashTableEntry<T>::NonConstT t(mozilla::Move(*p));
         HashPolicy::setKey(t, const_cast<Key &>(k));
         remove(*p.entry_);
         putNewInfallible(l, mozilla::Move(t));
     }
 
     void rekeyAndMaybeRehash(Ptr p, const Lookup &l, const Key &k)
     {
--- a/js/public/HeapAPI.h
+++ b/js/public/HeapAPI.h
@@ -81,23 +81,23 @@ struct Zone
         needsBarrier_(false)
     {}
 
     bool needsBarrier() const {
         return needsBarrier_;
     }
 
     JSTracer *barrierTracer() {
-        MOZ_ASSERT(needsBarrier_);
-        MOZ_ASSERT(js::CurrentThreadCanAccessRuntime(runtime_));
+        JS_ASSERT(needsBarrier_);
+        JS_ASSERT(js::CurrentThreadCanAccessRuntime(runtime_));
         return barrierTracer_;
     }
 
     JSRuntime *runtimeFromMainThread() const {
-        MOZ_ASSERT(js::CurrentThreadCanAccessRuntime(runtime_));
+        JS_ASSERT(js::CurrentThreadCanAccessRuntime(runtime_));
         return runtime_;
     }
 
     // Note: Unrestricted access to the zone's runtime from an arbitrary
     // thread can easily lead to races. Use this method very carefully.
     JSRuntime *runtimeFromAnyThread() const {
         return runtime_;
     }
@@ -111,40 +111,40 @@ struct Zone
 } /* namespace JS */
 
 namespace js {
 namespace gc {
 
 static MOZ_ALWAYS_INLINE uintptr_t *
 GetGCThingMarkBitmap(const void *thing)
 {
-    MOZ_ASSERT(thing);
+    JS_ASSERT(thing);
     uintptr_t addr = uintptr_t(thing);
     addr &= ~js::gc::ChunkMask;
     addr |= js::gc::ChunkMarkBitmapOffset;
     return reinterpret_cast<uintptr_t *>(addr);
 }
 
 static MOZ_ALWAYS_INLINE JS::shadow::Runtime *
 GetGCThingRuntime(const void *thing)
 {
-    MOZ_ASSERT(thing);
+    JS_ASSERT(thing);
     uintptr_t addr = uintptr_t(thing);
     addr &= ~js::gc::ChunkMask;
     addr |= js::gc::ChunkRuntimeOffset;
     return *reinterpret_cast<JS::shadow::Runtime **>(addr);
 }
 
 static MOZ_ALWAYS_INLINE void
 GetGCThingMarkWordAndMask(const void *thing, uint32_t color,
                           uintptr_t **wordp, uintptr_t *maskp)
 {
     uintptr_t addr = uintptr_t(thing);
     size_t bit = (addr & js::gc::ChunkMask) / js::gc::CellSize + color;
-    MOZ_ASSERT(bit < js::gc::ChunkMarkBitmapBits);
+    JS_ASSERT(bit < js::gc::ChunkMarkBitmapBits);
     uintptr_t *bitmap = GetGCThingMarkBitmap(thing);
     const uintptr_t nbits = sizeof(*bitmap) * CHAR_BIT;
     *maskp = uintptr_t(1) << (bit % nbits);
     *wordp = &bitmap[bit / nbits];
 }
 
 static MOZ_ALWAYS_INLINE JS::shadow::ArenaHeader *
 GetGCThingArena(void *thing)
@@ -168,17 +168,17 @@ IsInsideNursery(const JS::shadow::Runtim
 
 } /* namespace js */
 
 namespace JS {
 
 static MOZ_ALWAYS_INLINE Zone *
 GetGCThingZone(void *thing)
 {
-    MOZ_ASSERT(thing);
+    JS_ASSERT(thing);
     return js::gc::GetGCThingArena(thing)->zone;
 }
 
 static MOZ_ALWAYS_INLINE Zone *
 GetObjectZone(JSObject *obj)
 {
     return GetGCThingZone(obj);
 }
--- a/js/public/Id.h
+++ b/js/public/Id.h
@@ -50,17 +50,17 @@ static MOZ_ALWAYS_INLINE bool
 JSID_IS_STRING(jsid id)
 {
     return (JSID_BITS(id) & JSID_TYPE_MASK) == 0;
 }
 
 static MOZ_ALWAYS_INLINE JSString *
 JSID_TO_STRING(jsid id)
 {
-    MOZ_ASSERT(JSID_IS_STRING(id));
+    JS_ASSERT(JSID_IS_STRING(id));
     return (JSString *)JSID_BITS(id);
 }
 
 static MOZ_ALWAYS_INLINE bool
 JSID_IS_ZERO(jsid id)
 {
     return JSID_BITS(id) == 0;
 }
@@ -69,58 +69,58 @@ static MOZ_ALWAYS_INLINE bool
 JSID_IS_INT(jsid id)
 {
     return !!(JSID_BITS(id) & JSID_TYPE_INT);
 }
 
 static MOZ_ALWAYS_INLINE int32_t
 JSID_TO_INT(jsid id)
 {
-    MOZ_ASSERT(JSID_IS_INT(id));
+    JS_ASSERT(JSID_IS_INT(id));
     return ((uint32_t)JSID_BITS(id)) >> 1;
 }
 
 #define JSID_INT_MIN  0
 #define JSID_INT_MAX  INT32_MAX
 
 static MOZ_ALWAYS_INLINE bool
 INT_FITS_IN_JSID(int32_t i)
 {
     return i >= 0;
 }
 
 static MOZ_ALWAYS_INLINE jsid
 INT_TO_JSID(int32_t i)
 {
     jsid id;
-    MOZ_ASSERT(INT_FITS_IN_JSID(i));
+    JS_ASSERT(INT_FITS_IN_JSID(i));
     JSID_BITS(id) = ((i << 1) | JSID_TYPE_INT);
     return id;
 }
 
 static MOZ_ALWAYS_INLINE bool
 JSID_IS_OBJECT(jsid id)
 {
     return (JSID_BITS(id) & JSID_TYPE_MASK) == JSID_TYPE_OBJECT &&
            (size_t)JSID_BITS(id) != JSID_TYPE_OBJECT;
 }
 
 static MOZ_ALWAYS_INLINE JSObject *
 JSID_TO_OBJECT(jsid id)
 {
-    MOZ_ASSERT(JSID_IS_OBJECT(id));
+    JS_ASSERT(JSID_IS_OBJECT(id));
     return (JSObject *)(JSID_BITS(id) & ~(size_t)JSID_TYPE_MASK);
 }
 
 static MOZ_ALWAYS_INLINE jsid
 OBJECT_TO_JSID(JSObject *obj)
 {
     jsid id;
-    MOZ_ASSERT(obj != nullptr);
-    MOZ_ASSERT(((size_t)obj & JSID_TYPE_MASK) == 0);
+    JS_ASSERT(obj != nullptr);
+    JS_ASSERT(((size_t)obj & JSID_TYPE_MASK) == 0);
     JSID_BITS(id) = ((size_t)obj | JSID_TYPE_OBJECT);
     return id;
 }
 
 static MOZ_ALWAYS_INLINE bool
 JSID_IS_GCTHING(jsid id)
 {
     return JSID_IS_STRING(id) || JSID_IS_OBJECT(id);
@@ -130,17 +130,17 @@ static MOZ_ALWAYS_INLINE void *
 JSID_TO_GCTHING(jsid id)
 {
     return (void *)(JSID_BITS(id) & ~(size_t)JSID_TYPE_MASK);
 }
 
 static MOZ_ALWAYS_INLINE bool
 JSID_IS_VOID(const jsid id)
 {
-    MOZ_ASSERT_IF(((size_t)JSID_BITS(id) & JSID_TYPE_MASK) == JSID_TYPE_VOID,
+    JS_ASSERT_IF(((size_t)JSID_BITS(id) & JSID_TYPE_MASK) == JSID_TYPE_VOID,
                  JSID_BITS(id) == JSID_TYPE_VOID);
     return ((size_t)JSID_BITS(id) == JSID_TYPE_VOID);
 }
 
 static MOZ_ALWAYS_INLINE bool
 JSID_IS_EMPTY(const jsid id)
 {
     return ((size_t)JSID_BITS(id) == JSID_TYPE_OBJECT);
--- a/js/public/ProfilingStack.h
+++ b/js/public/ProfilingStack.h
@@ -46,26 +46,26 @@ class ProfileEntry
 
   public:
     // All of these methods are marked with the 'volatile' keyword because SPS's
     // representation of the stack is stored such that all ProfileEntry
     // instances are volatile. These methods would not be available unless they
     // were marked as volatile as well.
 
     bool js() const volatile {
-        MOZ_ASSERT_IF(sp == nullptr, script_ != nullptr);
+        JS_ASSERT_IF(sp == nullptr, script_ != nullptr);
         return sp == nullptr;
     }
 
-    uint32_t line() const volatile { MOZ_ASSERT(!js()); return idx; }
-    JSScript *script() const volatile { MOZ_ASSERT(js()); return script_; }
+    uint32_t line() const volatile { JS_ASSERT(!js()); return idx; }
+    JSScript *script() const volatile { JS_ASSERT(js()); return script_; }
     void *stackAddress() const volatile { return sp; }
     const char *label() const volatile { return string; }
 
-    void setLine(uint32_t aLine) volatile { MOZ_ASSERT(!js()); idx = aLine; }
+    void setLine(uint32_t aLine) volatile { JS_ASSERT(!js()); idx = aLine; }
     void setLabel(const char *aString) volatile { string = aString; }
     void setStackAddress(void *aSp) volatile { sp = aSp; }
     void setScript(JSScript *aScript) volatile { script_ = aScript; }
 
     // We can't know the layout of JSScript, so look in vm/SPSProfiler.cpp.
     JS_FRIEND_API(jsbytecode *) pc() const volatile;
     JS_FRIEND_API(void) setPC(jsbytecode *pc) volatile;
 
--- a/js/public/RootingAPI.h
+++ b/js/public/RootingAPI.h
@@ -233,39 +233,39 @@ class Heap : public js::HeapBase<T>
     }
 
     Heap<T> &operator=(const Heap<T>& other) {
         set(other.get());
         return *this;
     }
 
     void set(T newPtr) {
-        MOZ_ASSERT(!js::GCMethods<T>::poisoned(newPtr));
+        JS_ASSERT(!js::GCMethods<T>::poisoned(newPtr));
         if (js::GCMethods<T>::needsPostBarrier(newPtr)) {
             ptr = newPtr;
             post();
         } else if (js::GCMethods<T>::needsPostBarrier(ptr)) {
             relocate();  /* Called before overwriting ptr. */
             ptr = newPtr;
         } else {
             ptr = newPtr;
         }
     }
 
   private:
     void init(T newPtr) {
-        MOZ_ASSERT(!js::GCMethods<T>::poisoned(newPtr));
+        JS_ASSERT(!js::GCMethods<T>::poisoned(newPtr));
         ptr = newPtr;
         if (js::GCMethods<T>::needsPostBarrier(ptr))
             post();
     }
 
     void post() {
 #ifdef JSGC_GENERATIONAL
-        MOZ_ASSERT(js::GCMethods<T>::needsPostBarrier(ptr));
+        JS_ASSERT(js::GCMethods<T>::needsPostBarrier(ptr));
         js::GCMethods<T>::postBarrier(&ptr);
 #endif
     }
 
     void relocate() {
 #ifdef JSGC_GENERATIONAL
         js::GCMethods<T>::relocate(&ptr);
 #endif
@@ -325,35 +325,35 @@ class TenuredHeap : public js::HeapBase<
     }
     explicit TenuredHeap(T p) : bits(0) { setPtr(p); }
     explicit TenuredHeap(const TenuredHeap<T> &p) : bits(0) { setPtr(p.ptr); }
 
     bool operator==(const TenuredHeap<T> &other) { return bits == other.bits; }
     bool operator!=(const TenuredHeap<T> &other) { return bits != other.bits; }
 
     void setPtr(T newPtr) {
-        MOZ_ASSERT((reinterpret_cast<uintptr_t>(newPtr) & flagsMask) == 0);
-        MOZ_ASSERT(!js::GCMethods<T>::poisoned(newPtr));
+        JS_ASSERT((reinterpret_cast<uintptr_t>(newPtr) & flagsMask) == 0);
+        JS_ASSERT(!js::GCMethods<T>::poisoned(newPtr));
         if (newPtr)
             AssertGCThingMustBeTenured(newPtr);
         bits = (bits & flagsMask) | reinterpret_cast<uintptr_t>(newPtr);
     }
 
     void setFlags(uintptr_t flagsToSet) {
-        MOZ_ASSERT((flagsToSet & ~flagsMask) == 0);
+        JS_ASSERT((flagsToSet & ~flagsMask) == 0);
         bits |= flagsToSet;
     }
 
     void unsetFlags(uintptr_t flagsToUnset) {
-        MOZ_ASSERT((flagsToUnset & ~flagsMask) == 0);
+        JS_ASSERT((flagsToUnset & ~flagsMask) == 0);
         bits &= ~flagsToUnset;
     }
 
     bool hasFlag(uintptr_t flag) const {
-        MOZ_ASSERT((flag & ~flagsMask) == 0);
+        JS_ASSERT((flag & ~flagsMask) == 0);
         return (bits & flag) != 0;
     }
 
     T getPtr() const { return reinterpret_cast<T>(bits & ~flagsMask); }
     uintptr_t getFlags() const { return bits & flagsMask; }
 
     operator T() const { return getPtr(); }
     T operator->() const { return getPtr(); }
@@ -524,17 +524,17 @@ class MOZ_STACK_CLASS MutableHandle : pu
                   typename mozilla::EnableIf<mozilla::IsNullPointer<N>::value ||
                                              mozilla::IsSame<N, int>::value ||
                                              mozilla::IsSame<N, long>::value,
                                              int>::Type dummy = 0)
     MOZ_DELETE;
 
   public:
     void set(T v) {
-        MOZ_ASSERT(!js::GCMethods<T>::poisoned(v));
+        JS_ASSERT(!js::GCMethods<T>::poisoned(v));
         *ptr = v;
     }
 
     /*
      * This may be called only if the location of the T is guaranteed
      * to be marked (for some reason other than being a Rooted),
      * e.g., if it is guaranteed to be reachable from an implicit root.
      *
@@ -690,17 +690,17 @@ class MOZ_STACK_CLASS Rooted : public js
     template <typename CX>
     void init(CX *cx) {
 #ifdef JSGC_TRACK_EXACT_ROOTS
         js::ThingRootKind kind = js::GCMethods<T>::kind();
         this->stack = &cx->thingGCRooters[kind];
         this->prev = *stack;
         *stack = reinterpret_cast<Rooted<void*>*>(this);
 
-        MOZ_ASSERT(!js::GCMethods<T>::poisoned(ptr));
+        JS_ASSERT(!js::GCMethods<T>::poisoned(ptr));
 #endif
     }
 
   public:
     Rooted(JSContext *cx
            MOZ_GUARD_OBJECT_NOTIFIER_PARAM)
       : ptr(js::GCMethods<T>::initial())
     {
@@ -770,17 +770,17 @@ class MOZ_STACK_CLASS Rooted : public js
         init(js::PerThreadDataFriendFields::getMainThread(rt));
     }
 
     // Note that we need to let the compiler generate the default destructor in
     // non-exact-rooting builds because of a bug in the instrumented PGO builds
     // using MSVC, see bug 915735 for more details.
 #ifdef JSGC_TRACK_EXACT_ROOTS
     ~Rooted() {
-        MOZ_ASSERT(*stack == reinterpret_cast<Rooted<void*>*>(this));
+        JS_ASSERT(*stack == reinterpret_cast<Rooted<void*>*>(this));
         *stack = prev;
     }
 #endif
 
 #ifdef JSGC_TRACK_EXACT_ROOTS
     Rooted<T> *previous() { return prev; }
 #endif
 
@@ -791,28 +791,28 @@ class MOZ_STACK_CLASS Rooted : public js
     operator const T&() const { return ptr; }
     T operator->() const { return ptr; }
     T *address() { return &ptr; }
     const T *address() const { return &ptr; }
     T &get() { return ptr; }
     const T &get() const { return ptr; }
 
     T &operator=(T value) {
-        MOZ_ASSERT(!js::GCMethods<T>::poisoned(value));
+        JS_ASSERT(!js::GCMethods<T>::poisoned(value));
         ptr = value;
         return ptr;
     }
 
     T &operator=(const Rooted &value) {
         ptr = value;
         return ptr;
     }
 
     void set(T value) {
-        MOZ_ASSERT(!js::GCMethods<T>::poisoned(value));
+        JS_ASSERT(!js::GCMethods<T>::poisoned(value));
         ptr = value;
     }
 
     bool operator!=(const T &other) const { return ptr != other; }
     bool operator==(const T &other) const { return ptr == other; }
 
   private:
 #ifdef JSGC_TRACK_EXACT_ROOTS
@@ -882,17 +882,17 @@ class SkipRoot
         this->prev = *stack;
         *stack = this;
         this->start = (const uint8_t *) ptr;
         this->end = this->start + (sizeof(T) * count);
     }
 
   public:
     ~SkipRoot() {
-        MOZ_ASSERT(*stack == this);
+        JS_ASSERT(*stack == this);
         *stack = prev;
     }
 
     SkipRoot *previous() { return prev; }
 
     bool contains(const uint8_t *v, size_t len) {
         return v >= start && v + len <= end;
     }
@@ -1016,23 +1016,23 @@ class FakeRooted : public RootedBase<T>
     operator T() const { return ptr; }
     T operator->() const { return ptr; }
     T *address() { return &ptr; }
     const T *address() const { return &ptr; }
     T &get() { return ptr; }
     const T &get() const { return ptr; }
 
     FakeRooted<T> &operator=(T value) {
-        MOZ_ASSERT(!GCMethods<T>::poisoned(value));
+        JS_ASSERT(!GCMethods<T>::poisoned(value));
         ptr = value;
         return *this;
     }
 
     FakeRooted<T> &operator=(const FakeRooted<T> &other) {
-        MOZ_ASSERT(!GCMethods<T>::poisoned(other.ptr));
+        JS_ASSERT(!GCMethods<T>::poisoned(other.ptr));
         ptr = other.ptr;
         return *this;
     }
 
     bool operator!=(const T &other) const { return ptr != other; }
     bool operator==(const T &other) const { return ptr == other; }
 
   private:
@@ -1052,17 +1052,17 @@ class FakeMutableHandle : public js::Mut
         ptr = t;
     }
 
     FakeMutableHandle(FakeRooted<T> *root) {
         ptr = root->address();
     }
 
     void set(T v) {
-        MOZ_ASSERT(!js::GCMethods<T>::poisoned(v));
+        JS_ASSERT(!js::GCMethods<T>::poisoned(v));
         *ptr = v;
     }
 
     T *address() const { return ptr; }
     T get() const { return *ptr; }
 
     operator T() const { return get(); }
     T operator->() const { return get(); }
@@ -1256,28 +1256,28 @@ class PersistentRooted : private mozilla
     operator const T&() const { return ptr; }
     T operator->() const { return ptr; }
     T *address() { return &ptr; }
     const T *address() const { return &ptr; }
     T &get() { return ptr; }
     const T &get() const { return ptr; }
 
     T &operator=(T value) {
-        MOZ_ASSERT(!js::GCMethods<T>::poisoned(value));
+        JS_ASSERT(!js::GCMethods<T>::poisoned(value));
         ptr = value;
         return ptr;
     }
 
     T &operator=(const PersistentRooted &value) {
         ptr = value;
         return ptr;
     }
 
     void set(T value) {
-        MOZ_ASSERT(!js::GCMethods<T>::poisoned(value));
+        JS_ASSERT(!js::GCMethods<T>::poisoned(value));
         ptr = value;
     }
 
     bool operator!=(const T &other) const { return ptr != other; }
     bool operator==(const T &other) const { return ptr == other; }
 
   private:
     T ptr;
--- a/js/public/Utility.h
+++ b/js/public/Utility.h
@@ -37,16 +37,26 @@ namespace js {}
 /*
  * Pattern used to overwrite freed memory. If you are accessing an object with
  * this pattern, you probably have a dangling pointer.
  */
 #define JS_FREE_PATTERN 0xDA
 
 #define JS_ASSERT(expr)           MOZ_ASSERT(expr)
 #define JS_ASSERT_IF(cond, expr)  MOZ_ASSERT_IF(cond, expr)
+#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 (!(expr)) MOZ_CRASH(); } while(0)
+#else
+# define JS_DIAGNOSTICS_ASSERT(expr) ((void) 0)
+#endif
 
 #define JS_STATIC_ASSERT(cond)           static_assert(cond, "JS_STATIC_ASSERT")
 #define JS_STATIC_ASSERT_IF(cond, expr)  MOZ_STATIC_ASSERT_IF(cond, expr, "JS_STATIC_ASSERT_IF")
 
 extern MOZ_NORETURN JS_PUBLIC_API(void)
 JS_Assert(const char *s, const char *file, int ln);
 
 /*
--- a/js/src/jsutil.h
+++ b/js/src/jsutil.h
@@ -6,35 +6,23 @@
 
 /*
  * PR assertion checker.
  */
 
 #ifndef jsutil_h
 #define jsutil_h
 
-#include "mozilla/Assertions.h"
 #include "mozilla/Compiler.h"
 #include "mozilla/GuardObjects.h"
 
 #include <limits.h>
 
 #include "js/Utility.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
-
 static MOZ_ALWAYS_INLINE void *
 js_memcpy(void *dst_, const void *src_, size_t len)
 {
     char *dst = (char *) dst_;
     const char *src = (const char *) src_;
     JS_ASSERT_IF(dst >= src, (size_t) (dst - src) >= len);
     JS_ASSERT_IF(src >= dst, (size_t) (src - dst) >= len);
 
--- a/js/xpconnect/src/Sandbox.cpp
+++ b/js/xpconnect/src/Sandbox.cpp
@@ -387,18 +387,18 @@ CloneNonReflectorsRead(JSContext *cx, JS
         size_t idx;
         if (JS_ReadBytes(reader, &idx, sizeof(size_t))) {
             RootedObject reflector(cx, reflectors->handleAt(idx));
             MOZ_ASSERT(reflector, "No object pointer?");
             MOZ_ASSERT(IsReflector(reflector), "Object pointer must be a reflector!");
 
             if (!JS_WrapObject(cx, &reflector))
                 return nullptr;
-            MOZ_ASSERT(WrapperFactory::IsXrayWrapper(reflector) ||
-                       IsReflector(reflector));
+            JS_ASSERT(WrapperFactory::IsXrayWrapper(reflector) ||
+                      IsReflector(reflector));
 
             return reflector;
         }
     }
 
     JS_ReportError(cx, "CloneNonReflectorsRead error");
     return nullptr;
 }
--- a/tools/profiler/PseudoStack.h
+++ b/tools/profiler/PseudoStack.h
@@ -377,18 +377,17 @@ public:
 
   void sampleRuntime(JSRuntime *runtime) {
     mRuntime = runtime;
     if (!runtime) {
       // JS shut down
       return;
     }
 
-    static_assert(sizeof(mStack[0]) == sizeof(js::ProfileEntry),
-                  "mStack must be binary compatible with js::ProfileEntry.");
+    JS_STATIC_ASSERT(sizeof(mStack[0]) == sizeof(js::ProfileEntry));
     js::SetRuntimeProfilingStack(runtime,
                                  (js::ProfileEntry*) mStack,
                                  (uint32_t*) &mStackPointer,
                                  uint32_t(mozilla::ArrayLength(mStack)));
     if (mStartJSSampling)
       enableJSSampling();
   }
   void enableJSSampling() {
--- a/xpcom/base/CycleCollectedJSRuntime.cpp
+++ b/xpcom/base/CycleCollectedJSRuntime.cpp
@@ -543,18 +543,17 @@ CycleCollectedJSRuntime::DescribeGCThing
       "String",
       "Script",
       "LazyScript",
       "IonCode",
       "Shape",
       "BaseShape",
       "TypeObject",
     };
-    static_assert(MOZ_ARRAY_LENGTH(trace_types) == JSTRACE_LAST + 1,
-                  "Length of trace_types should match the number of cases of JSGCTraceKind.");
+    JS_STATIC_ASSERT(MOZ_ARRAY_LENGTH(trace_types) == JSTRACE_LAST + 1);
     JS_snprintf(name, sizeof(name), "JS %s", trace_types[aTraceKind]);
   }
 
   // Disable printing global for objects while we figure out ObjShrink fallout.
   aCb.DescribeGCedNode(aIsMarked, name, compartmentAddress);
 }
 
 void