Bug 712873 - Part 1: Replace JS_ASSERT with MOZ_ASSERT outside js/ directory. r=luke

This commit is contained in:
Chris Peterson 2014-02-17 22:09:06 -08:00
parent 8870f2d542
commit fd5b839ab4
3 changed files with 16 additions and 16 deletions

View File

@ -1589,7 +1589,7 @@ NPObjWrapper_NewResolve(JSContext *cx, JS::Handle<JSObject*> obj, JS::Handle<jsi
static bool
NPObjWrapper_Convert(JSContext *cx, JS::Handle<JSObject*> obj, JSType hint, JS::MutableHandle<JS::Value> vp)
{
JS_ASSERT(hint == JSTYPE_NUMBER || hint == JSTYPE_STRING || hint == JSTYPE_VOID);
MOZ_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

View File

@ -46,7 +46,7 @@ public:
static JSObject*
Create(JSContext* aCx, nsIDOMBlob* aBlob)
{
JS_ASSERT(SameCOMIdentity(static_cast<nsISupports*>(aBlob), aBlob));
MOZ_ASSERT(SameCOMIdentity(static_cast<nsISupports*>(aBlob), aBlob));
JSObject* obj = JS_NewObject(aCx, &sClass, JS::NullPtr(), JS::NullPtr());
if (obj) {
@ -101,7 +101,7 @@ private:
static void
Finalize(JSFreeOp* aFop, JSObject* aObj)
{
JS_ASSERT(JS_GetClass(aObj) == &sClass);
MOZ_ASSERT(JS_GetClass(aObj) == &sClass);
nsIDOMBlob* blob = GetPrivate(aObj);
NS_IF_RELEASE(blob);
@ -248,7 +248,7 @@ public:
static JSObject*
Create(JSContext* aCx, nsIDOMFile* aFile)
{
JS_ASSERT(SameCOMIdentity(static_cast<nsISupports*>(aFile), aFile));
MOZ_ASSERT(SameCOMIdentity(static_cast<nsISupports*>(aFile), aFile));
JSObject* obj = JS_NewObject(aCx, &sClass, JS::NullPtr(), JS::NullPtr());
if (obj) {
@ -266,7 +266,7 @@ public:
if (classPtr == &sClass) {
nsISupports* priv = static_cast<nsISupports*>(JS_GetPrivate(aObj));
nsCOMPtr<nsIDOMFile> file = do_QueryInterface(priv);
JS_ASSERT_IF(priv, file);
MOZ_ASSERT_IF(priv, file);
return file;
}
}
@ -306,7 +306,7 @@ private:
static void
Finalize(JSFreeOp* aFop, JSObject* aObj)
{
JS_ASSERT(JS_GetClass(aObj) == &sClass);
MOZ_ASSERT(JS_GetClass(aObj) == &sClass);
nsIDOMFile* file = GetPrivate(aObj);
NS_IF_RELEASE(file);
@ -450,7 +450,7 @@ Blob::GetPrivate(JSObject* aObj)
if (classPtr == &sClass || classPtr == File::Class()) {
nsISupports* priv = static_cast<nsISupports*>(JS_GetPrivate(aObj));
nsCOMPtr<nsIDOMBlob> blob = do_QueryInterface(priv);
JS_ASSERT_IF(priv, blob);
MOZ_ASSERT_IF(priv, blob);
return blob;
}
}

View File

@ -302,11 +302,11 @@ struct WorkerStructuredCloneCallbacks
{
// See if object is a nsIDOMFile pointer.
if (aTag == DOMWORKER_SCTAG_FILE) {
JS_ASSERT(!aData);
MOZ_ASSERT(!aData);
nsIDOMFile* file;
if (JS_ReadBytes(aReader, &file, sizeof(file))) {
JS_ASSERT(file);
MOZ_ASSERT(file);
#ifdef DEBUG
{
@ -327,11 +327,11 @@ struct WorkerStructuredCloneCallbacks
}
// See if object is a nsIDOMBlob pointer.
else if (aTag == DOMWORKER_SCTAG_BLOB) {
JS_ASSERT(!aData);
MOZ_ASSERT(!aData);
nsIDOMBlob* blob;
if (JS_ReadBytes(aReader, &blob, sizeof(blob))) {
JS_ASSERT(blob);
MOZ_ASSERT(blob);
#ifdef DEBUG
{
@ -352,7 +352,7 @@ struct WorkerStructuredCloneCallbacks
}
// See if the object is an ImageData.
else if (aTag == SCTAG_DOM_IMAGEDATA) {
JS_ASSERT(!aData);
MOZ_ASSERT(!aData);
// Read the information out of the stream.
uint32_t width, height;
@ -459,11 +459,11 @@ struct MainThreadWorkerStructuredCloneCallbacks
// See if object is a nsIDOMFile pointer.
if (aTag == DOMWORKER_SCTAG_FILE) {
JS_ASSERT(!aData);
MOZ_ASSERT(!aData);
nsIDOMFile* file;
if (JS_ReadBytes(aReader, &file, sizeof(file))) {
JS_ASSERT(file);
MOZ_ASSERT(file);
#ifdef DEBUG
{
@ -493,11 +493,11 @@ struct MainThreadWorkerStructuredCloneCallbacks
}
// See if object is a nsIDOMBlob pointer.
else if (aTag == DOMWORKER_SCTAG_BLOB) {
JS_ASSERT(!aData);
MOZ_ASSERT(!aData);
nsIDOMBlob* blob;
if (JS_ReadBytes(aReader, &blob, sizeof(blob))) {
JS_ASSERT(blob);
MOZ_ASSERT(blob);
#ifdef DEBUG
{