mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 902820 - Fix a bunch of compile warnings in SpiderMonkey. r=till.
--HG-- extra : rebase_source : 0306d26443640104bae575a60fec7a693f7b43c5
This commit is contained in:
parent
c0960f9abc
commit
19e1fbb452
@ -856,6 +856,10 @@ class SkipRoot
|
||||
void init(js::ContextFriendFields *cx, const T *ptr, size_t count) {}
|
||||
|
||||
public:
|
||||
~SkipRoot() {
|
||||
// An empty destructor is needed to avoid warnings from clang about
|
||||
// unused local variables of this type.
|
||||
}
|
||||
|
||||
#endif /* DEBUG && JSGC_ROOT_ANALYSIS */
|
||||
|
||||
|
@ -23,6 +23,8 @@
|
||||
#include "jsatominlines.h"
|
||||
#include "jsobjinlines.h"
|
||||
|
||||
using mozilla::DebugOnly;
|
||||
|
||||
using namespace js;
|
||||
|
||||
/*
|
||||
@ -1552,7 +1554,7 @@ StructType::layout(JSContext *cx, HandleObject structType, HandleObject fields)
|
||||
|
||||
// If the field type is a BinaryType and we can't get its bytes, we have a problem.
|
||||
RootedValue fieldTypeBytes(cx);
|
||||
bool r = JSObject::getProperty(cx, fieldType, fieldType, cx->names().bytes, &fieldTypeBytes);
|
||||
DebugOnly<bool> r = JSObject::getProperty(cx, fieldType, fieldType, cx->names().bytes, &fieldTypeBytes);
|
||||
JS_ASSERT(r);
|
||||
|
||||
JS_ASSERT(fieldTypeBytes.isInt32());
|
||||
|
@ -18,6 +18,8 @@
|
||||
|
||||
#include "jsgcinlines.h"
|
||||
|
||||
#include "vm/ObjectImpl-inl.h"
|
||||
|
||||
using namespace js;
|
||||
using namespace js::gc;
|
||||
|
||||
|
@ -376,9 +376,10 @@ CodeGeneratorX86Shared::visitMinMaxD(LMinMaxD *ins)
|
||||
{
|
||||
FloatRegister first = ToFloatRegister(ins->first());
|
||||
FloatRegister second = ToFloatRegister(ins->second());
|
||||
#ifdef DEBUG
|
||||
FloatRegister output = ToFloatRegister(ins->output());
|
||||
|
||||
JS_ASSERT(first == output);
|
||||
#endif
|
||||
|
||||
Label done, nan, minMaxInst;
|
||||
|
||||
|
@ -433,6 +433,10 @@ class AutoLockForExclusiveAccess
|
||||
AutoLockForExclusiveAccess(JSRuntime *rt MOZ_GUARD_OBJECT_NOTIFIER_PARAM) {
|
||||
MOZ_GUARD_OBJECT_NOTIFIER_INIT;
|
||||
}
|
||||
~AutoLockForExclusiveAccess() {
|
||||
// An empty destructor is needed to avoid warnings from clang about
|
||||
// unused local variables of this type.
|
||||
}
|
||||
#endif // JS_THREADSAFE
|
||||
|
||||
MOZ_DECL_USE_GUARD_OBJECT_NOTIFIER
|
||||
|
@ -507,7 +507,7 @@ Class JSFunction::class_ = {
|
||||
fun_trace
|
||||
};
|
||||
|
||||
JS_FRIEND_DATA(Class* const) js::FunctionClassPtr = &JSFunction::class_;
|
||||
Class* const js::FunctionClassPtr = &JSFunction::class_;
|
||||
|
||||
/* Find the body of a function (not including braces). */
|
||||
static bool
|
||||
|
@ -80,7 +80,7 @@ Class JSObject::class_ = {
|
||||
JS_ConvertStub
|
||||
};
|
||||
|
||||
JS_FRIEND_DATA(Class* const) js::ObjectClassPtr = &JSObject::class_;
|
||||
Class* const js::ObjectClassPtr = &JSObject::class_;
|
||||
|
||||
JS_FRIEND_API(JSObject *)
|
||||
JS_ObjectToInnerObject(JSContext *cx, JSObject *objArg)
|
||||
|
@ -3133,7 +3133,7 @@ Class js::ObjectProxyObject::class_ = {
|
||||
}
|
||||
};
|
||||
|
||||
JS_FRIEND_DATA(Class* const) js::ObjectProxyClassPtr = &ObjectProxyObject::class_;
|
||||
Class* const js::ObjectProxyClassPtr = &ObjectProxyObject::class_;
|
||||
|
||||
Class js::OuterWindowProxyObject::class_ = {
|
||||
"Proxy",
|
||||
@ -3192,7 +3192,7 @@ Class js::OuterWindowProxyObject::class_ = {
|
||||
}
|
||||
};
|
||||
|
||||
JS_FRIEND_DATA(Class* const) js::OuterWindowProxyClassPtr = &OuterWindowProxyObject::class_;
|
||||
Class* const js::OuterWindowProxyClassPtr = &OuterWindowProxyObject::class_;
|
||||
|
||||
static bool
|
||||
proxy_Call(JSContext *cx, unsigned argc, Value *vp)
|
||||
@ -3263,7 +3263,7 @@ Class js::FunctionProxyObject::class_ = {
|
||||
}
|
||||
};
|
||||
|
||||
JS_FRIEND_DATA(Class* const) js::FunctionProxyClassPtr = &FunctionProxyObject::class_;
|
||||
Class* const js::FunctionProxyClassPtr = &FunctionProxyObject::class_;
|
||||
|
||||
/* static */ ProxyObject *
|
||||
ProxyObject::New(JSContext *cx, BaseProxyHandler *handler, HandleValue priv, TaggedProto proto_,
|
||||
|
@ -289,8 +289,10 @@ class AutoUnlockWorkerThreadState
|
||||
/* Pause any threads that are running jobs off thread during GC activity. */
|
||||
class AutoPauseWorkersForGC
|
||||
{
|
||||
#ifdef JS_WORKER_THREADS
|
||||
JSRuntime *runtime;
|
||||
bool needsUnpause;
|
||||
#endif
|
||||
MOZ_DECL_USE_GUARD_OBJECT_NOTIFIER
|
||||
|
||||
public:
|
||||
|
@ -186,7 +186,10 @@ ThreadPoolWorker::terminate()
|
||||
// them down when requested.
|
||||
|
||||
ThreadPool::ThreadPool(JSRuntime *rt)
|
||||
: runtime_(rt),
|
||||
:
|
||||
#if defined(JS_THREADSAFE) || defined(DEBUG)
|
||||
runtime_(rt),
|
||||
#endif
|
||||
numWorkers_(0), // updated during init()
|
||||
nextId_(0)
|
||||
{
|
||||
|
@ -70,7 +70,9 @@ class ThreadPool
|
||||
friend class ThreadPoolWorker;
|
||||
|
||||
// Initialized at startup only:
|
||||
#if defined(JS_THREADSAFE) || defined(DEBUG)
|
||||
JSRuntime *const runtime_;
|
||||
#endif
|
||||
js::Vector<ThreadPoolWorker*, 8, SystemAllocPolicy> workers_;
|
||||
|
||||
// Number of workers we will start, when we actually start them
|
||||
|
Loading…
Reference in New Issue
Block a user