зеркало из https://github.com/mozilla/gecko-dev.git
No bug - Fix four warnings in js/src; r=sparky
This commit is contained in:
Родитель
6a48a6d878
Коммит
621285316d
|
@ -6,6 +6,7 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "mozilla/DebugOnly.h"
|
||||
#include "mozilla/Util.h"
|
||||
|
||||
#include "jsapi.h"
|
||||
|
@ -534,7 +535,7 @@ AutoGCRooter::trace(JSTracer *trc)
|
|||
case OBJOBJHASHMAP: {
|
||||
AutoObjectObjectHashMap::HashMapImpl &map = static_cast<AutoObjectObjectHashMap *>(this)->map;
|
||||
for (AutoObjectObjectHashMap::Enum e(map); !e.empty(); e.popFront()) {
|
||||
RawObject key = e.front().key;
|
||||
mozilla::DebugOnly<RawObject> key = e.front().key;
|
||||
MarkObjectRoot(trc, (RawObject *) &e.front().key, "AutoObjectObjectHashMap key");
|
||||
JS_ASSERT(key == e.front().key);
|
||||
MarkObjectRoot(trc, &e.front().value, "AutoObjectObjectHashMap value");
|
||||
|
|
|
@ -212,6 +212,7 @@ PrintDefinition(FILE *fp, const LDefinition &def)
|
|||
fprintf(fp, "]");
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
static void
|
||||
PrintUse(char *buf, size_t size, const LUse *use)
|
||||
{
|
||||
|
@ -231,7 +232,6 @@ PrintUse(char *buf, size_t size, const LUse *use)
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
const char *
|
||||
LAllocation::toString() const
|
||||
{
|
||||
|
|
|
@ -887,8 +887,8 @@ JSRuntime::JSRuntime(JSUseHelperThreads useHelperThreads)
|
|||
ionActivation(NULL),
|
||||
ionPcScriptCache(NULL),
|
||||
threadPool(this),
|
||||
ionReturnOverride_(MagicValue(JS_ARG_POISON)),
|
||||
ctypesActivityCallback(NULL),
|
||||
ionReturnOverride_(MagicValue(JS_ARG_POISON)),
|
||||
useHelperThreads_(useHelperThreads),
|
||||
requestedHelperThreadCount(-1)
|
||||
{
|
||||
|
|
|
@ -110,9 +110,9 @@ intrinsic_ThrowError(JSContext *cx, unsigned argc, Value *vp)
|
|||
static JSBool
|
||||
intrinsic_AssertionFailed(JSContext *cx, unsigned argc, Value *vp)
|
||||
{
|
||||
CallArgs args = CallArgsFromVp(argc, vp);
|
||||
#ifdef DEBUG
|
||||
if (argc > 0) {
|
||||
CallArgs args = CallArgsFromVp(argc, vp);
|
||||
if (args.length() > 0) {
|
||||
// try to dump the informative string
|
||||
JSString *str = ToString(cx, args[0]);
|
||||
if (str) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче