зеркало из https://github.com/mozilla/gecko-dev.git
Warning patrol. No bug, r=themaid
--HG-- extra : rebase_source : 66d872e0ab56b73f1879d1aff9aba1dd3e71e9b3
This commit is contained in:
Родитель
5544e899b5
Коммит
374aa81278
|
@ -29,8 +29,16 @@
|
|||
#include "Platform.h"
|
||||
#include "mozilla/Assertions.h"
|
||||
|
||||
#ifndef DEBUG
|
||||
/*
|
||||
* Prevent unused-variable warnings by defining the macro WTF uses to test
|
||||
* for assertions taking effect.
|
||||
*/
|
||||
# define ASSERT_DISABLED 1
|
||||
#endif
|
||||
|
||||
#define ASSERT(assertion) MOZ_ASSERT(assertion)
|
||||
#define ASSERT_UNUSED(variable, assertion) ASSERT(assertion)
|
||||
#define ASSERT_UNUSED(variable, assertion) (((void)variable), ASSERT(assertion))
|
||||
#define ASSERT_NOT_REACHED() MOZ_NOT_REACHED("")
|
||||
#define CRASH() MOZ_Crash()
|
||||
#define COMPILE_ASSERT(exp, name) MOZ_STATIC_ASSERT(exp, #name)
|
||||
|
|
|
@ -1860,7 +1860,11 @@ INTERNED_STRING_TO_JSID(JSContext *cx, JSString *str)
|
|||
jsid id;
|
||||
JS_ASSERT(str);
|
||||
JS_ASSERT(((size_t)str & JSID_TYPE_MASK) == 0);
|
||||
#ifdef DEBUG
|
||||
JS_ASSERT(JS_StringHasBeenInterned(cx, str));
|
||||
#else
|
||||
(void)cx;
|
||||
#endif
|
||||
JSID_BITS(id) = (size_t)str;
|
||||
return id;
|
||||
}
|
||||
|
@ -5314,6 +5318,8 @@ JS_IsConstructing(JSContext *cx, const jsval *vp)
|
|||
} else {
|
||||
JS_ASSERT(JS_GetClass(callee)->construct != NULL);
|
||||
}
|
||||
#else
|
||||
(void)cx;
|
||||
#endif
|
||||
|
||||
return JSVAL_IS_MAGIC_IMPL(JSVAL_TO_IMPL(vp[1]));
|
||||
|
|
Загрузка…
Ссылка в новой задаче