No bug - Fix four warnings in js/src; r=sparky

This commit is contained in:
Ms2ger 2013-01-06 13:45:56 +01:00
parent 73466e942b
commit 4682d5c639
4 changed files with 6 additions and 5 deletions

View File

@ -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");

View File

@ -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
{

View File

@ -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)
{

View File

@ -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) {