mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 857385 - Make various JSFunctionSpec arrays const. r=waldo
--HG-- extra : rebase_source : 24141998ffad3b0e6bad98b6fc0ce3754e448d5b
This commit is contained in:
parent
25f43429b6
commit
5d0104d77b
@ -53,7 +53,7 @@ netscape_security_enablePrivilege(JSContext *cx, unsigned argc, JS::Value *vp)
|
||||
return xpc::EnableUniversalXPConnect(cx);
|
||||
}
|
||||
|
||||
static JSFunctionSpec PrivilegeManager_static_methods[] = {
|
||||
static const JSFunctionSpec PrivilegeManager_static_methods[] = {
|
||||
JS_FS("enablePrivilege", netscape_security_enablePrivilege, 1, 0),
|
||||
JS_FS_END
|
||||
};
|
||||
|
@ -2150,7 +2150,7 @@ TraceMallocDumpAllocations(JSContext *cx, unsigned argc, JS::Value *vp)
|
||||
return JS_TRUE;
|
||||
}
|
||||
|
||||
static JSFunctionSpec TraceMallocFunctions[] = {
|
||||
static const JSFunctionSpec TraceMallocFunctions[] = {
|
||||
JS_FS("TraceMallocDisable", TraceMallocDisable, 0, 0),
|
||||
JS_FS("TraceMallocEnable", TraceMallocEnable, 0, 0),
|
||||
JS_FS("TraceMallocOpenLogFile", TraceMallocOpenLogFile, 1, 0),
|
||||
@ -2205,7 +2205,7 @@ ReportAndDump(JSContext *cx, unsigned argc, JS::Value *vp)
|
||||
} // namespace dmd
|
||||
} // namespace mozilla
|
||||
|
||||
static JSFunctionSpec DMDFunctions[] = {
|
||||
static const JSFunctionSpec DMDFunctions[] = {
|
||||
JS_FS("DMDReportAndDump", dmd::ReportAndDump, 1, 0),
|
||||
JS_FS_END
|
||||
};
|
||||
@ -2306,7 +2306,7 @@ JProfSaveCircularJS(JSContext *cx, unsigned argc, JS::Value *vp)
|
||||
return JS_TRUE;
|
||||
}
|
||||
|
||||
static JSFunctionSpec JProfFunctions[] = {
|
||||
static const JSFunctionSpec JProfFunctions[] = {
|
||||
JS_FS("JProfStartProfiling", JProfStartProfilingJS, 0, 0),
|
||||
JS_FS("JProfStopProfiling", JProfStopProfilingJS, 0, 0),
|
||||
JS_FS("JProfClearCircular", JProfClearCircularJS, 0, 0),
|
||||
|
@ -225,8 +225,7 @@ IDBKeyRange::DefineConstructors(JSContext* aCx,
|
||||
NS_ASSERTION(aObject, "Null pointer!");
|
||||
|
||||
// Add the constructor methods for key ranges.
|
||||
return JS_DefineFunctions(aCx, aObject,
|
||||
const_cast<JSFunctionSpec*>(gKeyRangeConstructors));
|
||||
return JS_DefineFunctions(aCx, aObject, gKeyRangeConstructors);
|
||||
}
|
||||
|
||||
// static
|
||||
|
@ -36,7 +36,7 @@ class Event : public PrivatizableBase
|
||||
static JSClass sMainRuntimeClass;
|
||||
|
||||
static const JSPropertySpec sProperties[];
|
||||
static JSFunctionSpec sFunctions[];
|
||||
static const JSFunctionSpec sFunctions[];
|
||||
static const JSPropertySpec sStaticProperties[];
|
||||
|
||||
protected:
|
||||
@ -362,7 +362,7 @@ const JSPropertySpec Event::sProperties[] = {
|
||||
{ 0, 0, 0, JSOP_NULLWRAPPER, JSOP_NULLWRAPPER }
|
||||
};
|
||||
|
||||
JSFunctionSpec Event::sFunctions[] = {
|
||||
const JSFunctionSpec Event::sFunctions[] = {
|
||||
JS_FN("stopPropagation", StopPropagation, 0, FUNCTION_FLAGS),
|
||||
JS_FN("preventDefault", PreventDefault, 0, FUNCTION_FLAGS),
|
||||
JS_FN("initEvent", InitEvent, 3, FUNCTION_FLAGS),
|
||||
@ -385,7 +385,7 @@ class MessageEvent : public Event
|
||||
static JSClass sMainRuntimeClass;
|
||||
|
||||
static const JSPropertySpec sProperties[];
|
||||
static JSFunctionSpec sFunctions[];
|
||||
static const JSFunctionSpec sFunctions[];
|
||||
|
||||
protected:
|
||||
uint64_t* mData;
|
||||
@ -605,7 +605,7 @@ const JSPropertySpec MessageEvent::sProperties[] = {
|
||||
{ 0, 0, 0, JSOP_NULLWRAPPER, JSOP_NULLWRAPPER }
|
||||
};
|
||||
|
||||
JSFunctionSpec MessageEvent::sFunctions[] = {
|
||||
const JSFunctionSpec MessageEvent::sFunctions[] = {
|
||||
JS_FN("initMessageEvent", InitMessageEvent, 6, FUNCTION_FLAGS),
|
||||
JS_FS_END
|
||||
};
|
||||
@ -616,7 +616,7 @@ class ErrorEvent : public Event
|
||||
static JSClass sMainRuntimeClass;
|
||||
|
||||
static const JSPropertySpec sProperties[];
|
||||
static JSFunctionSpec sFunctions[];
|
||||
static const JSFunctionSpec sFunctions[];
|
||||
|
||||
public:
|
||||
static bool
|
||||
@ -791,7 +791,7 @@ const JSPropertySpec ErrorEvent::sProperties[] = {
|
||||
{ 0, 0, 0, JSOP_NULLWRAPPER, JSOP_NULLWRAPPER }
|
||||
};
|
||||
|
||||
JSFunctionSpec ErrorEvent::sFunctions[] = {
|
||||
const JSFunctionSpec ErrorEvent::sFunctions[] = {
|
||||
JS_FN("initErrorEvent", InitErrorEvent, 6, FUNCTION_FLAGS),
|
||||
JS_FS_END
|
||||
};
|
||||
@ -800,7 +800,7 @@ class ProgressEvent : public Event
|
||||
{
|
||||
static JSClass sClass;
|
||||
static const JSPropertySpec sProperties[];
|
||||
static JSFunctionSpec sFunctions[];
|
||||
static const JSFunctionSpec sFunctions[];
|
||||
|
||||
public:
|
||||
static JSClass*
|
||||
@ -965,7 +965,7 @@ const JSPropertySpec ProgressEvent::sProperties[] = {
|
||||
{ 0, 0, 0, JSOP_NULLWRAPPER, JSOP_NULLWRAPPER }
|
||||
};
|
||||
|
||||
JSFunctionSpec ProgressEvent::sFunctions[] = {
|
||||
const JSFunctionSpec ProgressEvent::sFunctions[] = {
|
||||
JS_FN("initProgressEvent", InitProgressEvent, 6, FUNCTION_FLAGS),
|
||||
JS_FS_END
|
||||
};
|
||||
|
@ -30,7 +30,7 @@ class DOMException : public PrivatizableBase
|
||||
{
|
||||
static JSClass sClass;
|
||||
static const JSPropertySpec sProperties[];
|
||||
static JSFunctionSpec sFunctions[];
|
||||
static const JSFunctionSpec sFunctions[];
|
||||
static const JSPropertySpec sStaticProperties[];
|
||||
|
||||
enum SLOT {
|
||||
@ -171,7 +171,7 @@ const JSPropertySpec DOMException::sProperties[] = {
|
||||
{ 0, 0, 0, JSOP_NULLWRAPPER, JSOP_NULLWRAPPER }
|
||||
};
|
||||
|
||||
JSFunctionSpec DOMException::sFunctions[] = {
|
||||
const JSFunctionSpec DOMException::sFunctions[] = {
|
||||
JS_FN("toString", ToString, 0, 0),
|
||||
JS_FS_END
|
||||
};
|
||||
|
@ -37,7 +37,7 @@ class Blob
|
||||
|
||||
static JSClass sClass;
|
||||
static const JSPropertySpec sProperties[];
|
||||
static JSFunctionSpec sFunctions[];
|
||||
static const JSFunctionSpec sFunctions[];
|
||||
|
||||
public:
|
||||
static JSObject*
|
||||
@ -213,7 +213,7 @@ const JSPropertySpec Blob::sProperties[] = {
|
||||
{ 0, 0, 0, JSOP_NULLWRAPPER, JSOP_NULLWRAPPER }
|
||||
};
|
||||
|
||||
JSFunctionSpec Blob::sFunctions[] = {
|
||||
const JSFunctionSpec Blob::sFunctions[] = {
|
||||
JS_FN("slice", Slice, 1, JSPROP_ENUMERATE),
|
||||
JS_FS_END
|
||||
};
|
||||
|
@ -21,7 +21,7 @@ class Location
|
||||
{
|
||||
static JSClass sClass;
|
||||
static const JSPropertySpec sProperties[];
|
||||
static JSFunctionSpec sFunctions[];
|
||||
static const JSFunctionSpec sFunctions[];
|
||||
|
||||
enum SLOT {
|
||||
SLOT_href = 0,
|
||||
@ -173,7 +173,7 @@ const JSPropertySpec Location::sProperties[] = {
|
||||
{ 0, 0, 0, JSOP_NULLWRAPPER, JSOP_NULLWRAPPER }
|
||||
};
|
||||
|
||||
JSFunctionSpec Location::sFunctions[] = {
|
||||
const JSFunctionSpec Location::sFunctions[] = {
|
||||
JS_FN("toString", ToString, 0, 0),
|
||||
JS_FS_END
|
||||
};
|
||||
|
@ -32,7 +32,7 @@ class Worker
|
||||
static DOMJSClass sClass;
|
||||
static DOMIfaceAndProtoJSClass sProtoClass;
|
||||
static const JSPropertySpec sProperties[];
|
||||
static JSFunctionSpec sFunctions[];
|
||||
static const JSFunctionSpec sFunctions[];
|
||||
|
||||
enum
|
||||
{
|
||||
@ -262,7 +262,7 @@ private:
|
||||
return false;
|
||||
}
|
||||
|
||||
const char*& name = sFunctions[0].name;
|
||||
const char* name = sFunctions[0].name;
|
||||
WorkerPrivate* worker = GetInstancePrivate(aCx, obj, name);
|
||||
if (!worker) {
|
||||
return !JS_IsExceptionPending(aCx);
|
||||
@ -279,7 +279,7 @@ private:
|
||||
return false;
|
||||
}
|
||||
|
||||
const char*& name = sFunctions[1].name;
|
||||
const char* name = sFunctions[1].name;
|
||||
WorkerPrivate* worker = GetInstancePrivate(aCx, obj, name);
|
||||
if (!worker) {
|
||||
return !JS_IsExceptionPending(aCx);
|
||||
@ -350,7 +350,7 @@ const JSPropertySpec Worker::sProperties[] = {
|
||||
{ 0, 0, 0, JSOP_NULLWRAPPER, JSOP_NULLWRAPPER }
|
||||
};
|
||||
|
||||
JSFunctionSpec Worker::sFunctions[] = {
|
||||
const JSFunctionSpec Worker::sFunctions[] = {
|
||||
JS_FN("terminate", Terminate, 0, FUNCTION_FLAGS),
|
||||
JS_FN("postMessage", PostMessage, 1, FUNCTION_FLAGS),
|
||||
JS_FS_END
|
||||
|
@ -60,7 +60,7 @@ class WorkerGlobalScope : public workers::EventTarget
|
||||
{
|
||||
static JSClass sClass;
|
||||
static const JSPropertySpec sProperties[];
|
||||
static JSFunctionSpec sFunctions[];
|
||||
static const JSFunctionSpec sFunctions[];
|
||||
|
||||
enum
|
||||
{
|
||||
@ -629,7 +629,7 @@ const JSPropertySpec WorkerGlobalScope::sProperties[] = {
|
||||
{ 0, 0, 0, JSOP_NULLWRAPPER, JSOP_NULLWRAPPER }
|
||||
};
|
||||
|
||||
JSFunctionSpec WorkerGlobalScope::sFunctions[] = {
|
||||
const JSFunctionSpec WorkerGlobalScope::sFunctions[] = {
|
||||
JS_FN("close", Close, 0, FUNCTION_FLAGS),
|
||||
JS_FN("importScripts", ImportScripts, 1, FUNCTION_FLAGS),
|
||||
JS_FN("setTimeout", SetTimeout, 1, FUNCTION_FLAGS),
|
||||
@ -652,7 +652,7 @@ class DedicatedWorkerGlobalScope : public WorkerGlobalScope
|
||||
static DOMJSClass sClass;
|
||||
static DOMIfaceAndProtoJSClass sProtoClass;
|
||||
static const JSPropertySpec sProperties[];
|
||||
static JSFunctionSpec sFunctions[];
|
||||
static const JSFunctionSpec sFunctions[];
|
||||
|
||||
enum
|
||||
{
|
||||
@ -854,7 +854,7 @@ private:
|
||||
return false;
|
||||
}
|
||||
|
||||
const char*& name = sFunctions[0].name;
|
||||
const char* name = sFunctions[0].name;
|
||||
DedicatedWorkerGlobalScope* scope = GetInstancePrivate(aCx, obj, name);
|
||||
if (!scope) {
|
||||
return false;
|
||||
@ -925,7 +925,7 @@ const JSPropertySpec DedicatedWorkerGlobalScope::sProperties[] = {
|
||||
{ 0, 0, 0, JSOP_NULLWRAPPER, JSOP_NULLWRAPPER }
|
||||
};
|
||||
|
||||
JSFunctionSpec DedicatedWorkerGlobalScope::sFunctions[] = {
|
||||
const JSFunctionSpec DedicatedWorkerGlobalScope::sFunctions[] = {
|
||||
JS_FN("postMessage", PostMessage, 1, FUNCTION_FLAGS),
|
||||
JS_FS_END
|
||||
};
|
||||
|
@ -492,7 +492,7 @@ DumpHeap(JSContext *cx,
|
||||
|
||||
#endif /* DEBUG */
|
||||
|
||||
JSFunctionSpec gGlobalFunctions[] =
|
||||
const JSFunctionSpec gGlobalFunctions[] =
|
||||
{
|
||||
JS_FS("print", Print, 0,0),
|
||||
JS_FS("load", Load, 1,0),
|
||||
|
@ -600,12 +600,12 @@ collator_toSource(JSContext *cx, unsigned argc, Value *vp)
|
||||
}
|
||||
#endif
|
||||
|
||||
static JSFunctionSpec collator_static_methods[] = {
|
||||
static const JSFunctionSpec collator_static_methods[] = {
|
||||
{"supportedLocalesOf", JSOP_NULLWRAPPER, 1, JSFunction::INTERPRETED, "Intl_Collator_supportedLocalesOf"},
|
||||
JS_FS_END
|
||||
};
|
||||
|
||||
static JSFunctionSpec collator_methods[] = {
|
||||
static const JSFunctionSpec collator_methods[] = {
|
||||
{"resolvedOptions", JSOP_NULLWRAPPER, 0, JSFunction::INTERPRETED, "Intl_Collator_resolvedOptions"},
|
||||
#if JS_HAS_TOSOURCE
|
||||
JS_FN(js_toSource_str, collator_toSource, 0, 0),
|
||||
@ -1078,12 +1078,12 @@ numberFormat_toSource(JSContext *cx, unsigned argc, Value *vp)
|
||||
}
|
||||
#endif
|
||||
|
||||
static JSFunctionSpec numberFormat_static_methods[] = {
|
||||
static const JSFunctionSpec numberFormat_static_methods[] = {
|
||||
{"supportedLocalesOf", JSOP_NULLWRAPPER, 1, JSFunction::INTERPRETED, "Intl_NumberFormat_supportedLocalesOf"},
|
||||
JS_FS_END
|
||||
};
|
||||
|
||||
static JSFunctionSpec numberFormat_methods[] = {
|
||||
static const JSFunctionSpec numberFormat_methods[] = {
|
||||
{"resolvedOptions", JSOP_NULLWRAPPER, 0, JSFunction::INTERPRETED, "Intl_NumberFormat_resolvedOptions"},
|
||||
#if JS_HAS_TOSOURCE
|
||||
JS_FN(js_toSource_str, numberFormat_toSource, 0, 0),
|
||||
@ -1527,12 +1527,12 @@ dateTimeFormat_toSource(JSContext *cx, unsigned argc, Value *vp)
|
||||
}
|
||||
#endif
|
||||
|
||||
static JSFunctionSpec dateTimeFormat_static_methods[] = {
|
||||
static const JSFunctionSpec dateTimeFormat_static_methods[] = {
|
||||
{"supportedLocalesOf", JSOP_NULLWRAPPER, 1, JSFunction::INTERPRETED, "Intl_DateTimeFormat_supportedLocalesOf"},
|
||||
JS_FS_END
|
||||
};
|
||||
|
||||
static JSFunctionSpec dateTimeFormat_methods[] = {
|
||||
static const JSFunctionSpec dateTimeFormat_methods[] = {
|
||||
{"resolvedOptions", JSOP_NULLWRAPPER, 0, JSFunction::INTERPRETED, "Intl_DateTimeFormat_resolvedOptions"},
|
||||
#if JS_HAS_TOSOURCE
|
||||
JS_FN(js_toSource_str, dateTimeFormat_toSource, 0, 0),
|
||||
@ -2002,7 +2002,7 @@ intl_toSource(JSContext *cx, unsigned argc, Value *vp)
|
||||
}
|
||||
#endif
|
||||
|
||||
static JSFunctionSpec intl_static_methods[] = {
|
||||
static const JSFunctionSpec intl_static_methods[] = {
|
||||
#if JS_HAS_TOSOURCE
|
||||
JS_FN(js_toSource_str, intl_toSource, 0, 0),
|
||||
#endif
|
||||
|
@ -847,7 +847,7 @@ class js::MapIteratorObject : public JSObject
|
||||
{
|
||||
public:
|
||||
enum { TargetSlot, KindSlot, RangeSlot, SlotCount };
|
||||
static JSFunctionSpec methods[];
|
||||
static const JSFunctionSpec methods[];
|
||||
static MapIteratorObject *create(JSContext *cx, HandleObject mapobj, ValueMap *data,
|
||||
MapObject::IteratorKind kind);
|
||||
static void finalize(FreeOp *fop, RawObject obj);
|
||||
@ -881,7 +881,7 @@ Class js::MapIteratorClass = {
|
||||
MapIteratorObject::finalize
|
||||
};
|
||||
|
||||
JSFunctionSpec MapIteratorObject::methods[] = {
|
||||
const JSFunctionSpec MapIteratorObject::methods[] = {
|
||||
JS_FN("next", next, 0, 0),
|
||||
JS_FS_END
|
||||
};
|
||||
@ -1031,7 +1031,7 @@ const JSPropertySpec MapObject::properties[] = {
|
||||
JS_PS_END
|
||||
};
|
||||
|
||||
JSFunctionSpec MapObject::methods[] = {
|
||||
const JSFunctionSpec MapObject::methods[] = {
|
||||
JS_FN("get", get, 1, 0),
|
||||
JS_FN("has", has, 1, 0),
|
||||
JS_FN("set", set, 2, 0),
|
||||
@ -1422,7 +1422,7 @@ class js::SetIteratorObject : public JSObject
|
||||
{
|
||||
public:
|
||||
enum { TargetSlot, RangeSlot, SlotCount };
|
||||
static JSFunctionSpec methods[];
|
||||
static const JSFunctionSpec methods[];
|
||||
static SetIteratorObject *create(JSContext *cx, HandleObject setobj, ValueSet *data);
|
||||
static void finalize(FreeOp *fop, RawObject obj);
|
||||
|
||||
@ -1454,7 +1454,7 @@ Class js::SetIteratorClass = {
|
||||
SetIteratorObject::finalize
|
||||
};
|
||||
|
||||
JSFunctionSpec SetIteratorObject::methods[] = {
|
||||
const JSFunctionSpec SetIteratorObject::methods[] = {
|
||||
JS_FN("next", next, 0, 0),
|
||||
JS_FS_END
|
||||
};
|
||||
@ -1574,7 +1574,7 @@ const JSPropertySpec SetObject::properties[] = {
|
||||
JS_PS_END
|
||||
};
|
||||
|
||||
JSFunctionSpec SetObject::methods[] = {
|
||||
const JSFunctionSpec SetObject::methods[] = {
|
||||
JS_FN("has", has, 1, 0),
|
||||
JS_FN("add", add, 1, 0),
|
||||
JS_FN("delete", delete_, 1, 0),
|
||||
|
@ -87,7 +87,7 @@ class MapObject : public JSObject {
|
||||
static Class class_;
|
||||
private:
|
||||
static const JSPropertySpec properties[];
|
||||
static JSFunctionSpec methods[];
|
||||
static const JSFunctionSpec methods[];
|
||||
ValueMap *getData() { return static_cast<ValueMap *>(getPrivate()); }
|
||||
static ValueMap & extract(CallReceiver call);
|
||||
static void mark(JSTracer *trc, RawObject obj);
|
||||
@ -124,7 +124,7 @@ class SetObject : public JSObject {
|
||||
static Class class_;
|
||||
private:
|
||||
static const JSPropertySpec properties[];
|
||||
static JSFunctionSpec methods[];
|
||||
static const JSFunctionSpec methods[];
|
||||
ValueSet *getData() { return static_cast<ValueSet *>(getPrivate()); }
|
||||
static ValueSet & extract(CallReceiver call);
|
||||
static void mark(JSTracer *trc, RawObject obj);
|
||||
|
@ -976,7 +976,7 @@ obj_isSealed(JSContext *cx, unsigned argc, Value *vp)
|
||||
return true;
|
||||
}
|
||||
|
||||
JSFunctionSpec js::object_methods[] = {
|
||||
const JSFunctionSpec js::object_methods[] = {
|
||||
#if JS_HAS_TOSOURCE
|
||||
JS_FN(js_toSource_str, obj_toSource, 0,0),
|
||||
#endif
|
||||
@ -999,7 +999,7 @@ JSFunctionSpec js::object_methods[] = {
|
||||
JS_FS_END
|
||||
};
|
||||
|
||||
JSFunctionSpec js::object_static_methods[] = {
|
||||
const JSFunctionSpec js::object_static_methods[] = {
|
||||
JS_FN("getPrototypeOf", obj_getPrototypeOf, 1,0),
|
||||
JS_FN("getOwnPropertyDescriptor", obj_getOwnPropertyDescriptor,2,0),
|
||||
JS_FN("keys", obj_keys, 1,0),
|
||||
|
@ -11,8 +11,8 @@
|
||||
|
||||
namespace js {
|
||||
|
||||
extern JSFunctionSpec object_methods[];
|
||||
extern JSFunctionSpec object_static_methods[];
|
||||
extern const JSFunctionSpec object_methods[];
|
||||
extern const JSFunctionSpec object_static_methods[];
|
||||
|
||||
/* Object constructor native. Exposed only so the JIT can know its address. */
|
||||
extern JSBool
|
||||
|
@ -26,7 +26,7 @@ using namespace js;
|
||||
|
||||
FixedHeapPtr<PropertyName> ParallelArrayObject::ctorNames[NumCtors];
|
||||
|
||||
JSFunctionSpec ParallelArrayObject::methods[] = {
|
||||
const JSFunctionSpec ParallelArrayObject::methods[] = {
|
||||
{ "map", JSOP_NULLWRAPPER, 2, 0, "ParallelArrayMap" },
|
||||
{ "reduce", JSOP_NULLWRAPPER, 2, 0, "ParallelArrayReduce" },
|
||||
{ "scan", JSOP_NULLWRAPPER, 2, 0, "ParallelArrayScan" },
|
||||
|
@ -20,7 +20,7 @@ namespace js {
|
||||
class ParallelArrayObject : public JSObject
|
||||
{
|
||||
static Class protoClass;
|
||||
static JSFunctionSpec methods[];
|
||||
static const JSFunctionSpec methods[];
|
||||
static const uint32_t NumFixedSlots = 4;
|
||||
static const uint32_t NumCtors = 4;
|
||||
static FixedHeapPtr<PropertyName> ctorNames[NumCtors];
|
||||
|
@ -359,7 +359,7 @@ DumpCallgrind(JSContext *cx, unsigned argc, jsval *vp)
|
||||
}
|
||||
#endif
|
||||
|
||||
static JSFunctionSpec profiling_functions[] = {
|
||||
static const JSFunctionSpec profiling_functions[] = {
|
||||
JS_FN("startProfiling", StartProfiling, 1,0),
|
||||
JS_FN("stopProfiling", StopProfiling, 1,0),
|
||||
JS_FN("pauseProfilers", PauseProfilers, 1,0),
|
||||
|
@ -381,7 +381,7 @@ regexp_toString(JSContext *cx, unsigned argc, Value *vp)
|
||||
return CallNonGenericMethod<IsRegExp, regexp_toString_impl>(cx, args);
|
||||
}
|
||||
|
||||
static JSFunctionSpec regexp_methods[] = {
|
||||
static const JSFunctionSpec regexp_methods[] = {
|
||||
#if JS_HAS_TOSOURCE
|
||||
JS_FN(js_toSource_str, regexp_toString, 0,0),
|
||||
#endif
|
||||
|
@ -551,14 +551,14 @@ static const JSPropertySpec sCTypeProps[] = {
|
||||
{ 0, 0, 0, JSOP_NULLWRAPPER, JSOP_NULLWRAPPER }
|
||||
};
|
||||
|
||||
static JSFunctionSpec sCTypeFunctions[] = {
|
||||
static const JSFunctionSpec sCTypeFunctions[] = {
|
||||
JS_FN("array", CType::CreateArray, 0, CTYPESFN_FLAGS),
|
||||
JS_FN("toString", CType::ToString, 0, CTYPESFN_FLAGS),
|
||||
JS_FN("toSource", CType::ToSource, 0, CTYPESFN_FLAGS),
|
||||
JS_FS_END
|
||||
};
|
||||
|
||||
static JSFunctionSpec sCABIFunctions[] = {
|
||||
static const JSFunctionSpec sCABIFunctions[] = {
|
||||
JS_FN("toSource", ABI::ToSource, 0, CABIFN_FLAGS),
|
||||
JS_FN("toString", ABI::ToSource, 0, CABIFN_FLAGS),
|
||||
JS_FS_END
|
||||
@ -570,7 +570,7 @@ static const JSPropertySpec sCDataProps[] = {
|
||||
{ 0, 0, 0, JSOP_NULLWRAPPER, JSOP_NULLWRAPPER }
|
||||
};
|
||||
|
||||
static JSFunctionSpec sCDataFunctions[] = {
|
||||
static const JSFunctionSpec sCDataFunctions[] = {
|
||||
JS_FN("address", CData::Address, 0, CDATAFN_FLAGS),
|
||||
JS_FN("readString", CData::ReadString, 0, CDATAFN_FLAGS),
|
||||
JS_FN("readStringReplaceMalformed", CData::ReadStringReplaceMalformed, 0, CDATAFN_FLAGS),
|
||||
@ -583,7 +583,7 @@ static const JSPropertySpec sCDataFinalizerProps[] = {
|
||||
{ 0, 0, 0, JSOP_NULLWRAPPER, JSOP_NULLWRAPPER }
|
||||
};
|
||||
|
||||
static JSFunctionSpec sCDataFinalizerFunctions[] = {
|
||||
static const JSFunctionSpec sCDataFinalizerFunctions[] = {
|
||||
JS_FN("dispose", CDataFinalizer::Methods::Dispose, 0, CDATAFINALIZERFN_FLAGS),
|
||||
JS_FN("forget", CDataFinalizer::Methods::Forget, 0, CDATAFINALIZERFN_FLAGS),
|
||||
JS_FN("readString",CData::ReadString, 0, CDATAFINALIZERFN_FLAGS),
|
||||
@ -592,7 +592,7 @@ static JSFunctionSpec sCDataFinalizerFunctions[] = {
|
||||
JS_FS_END
|
||||
};
|
||||
|
||||
static JSFunctionSpec sPointerFunction =
|
||||
static const JSFunctionSpec sPointerFunction =
|
||||
JS_FN("PointerType", PointerType::Create, 1, CTYPESCTOR_FLAGS);
|
||||
|
||||
static const JSPropertySpec sPointerProps[] = {
|
||||
@ -601,7 +601,7 @@ static const JSPropertySpec sPointerProps[] = {
|
||||
{ 0, 0, 0, JSOP_NULLWRAPPER, JSOP_NULLWRAPPER }
|
||||
};
|
||||
|
||||
static JSFunctionSpec sPointerInstanceFunctions[] = {
|
||||
static const JSFunctionSpec sPointerInstanceFunctions[] = {
|
||||
JS_FN("isNull", PointerType::IsNull, 0, CTYPESFN_FLAGS),
|
||||
JS_FN("increment", PointerType::Increment, 0, CTYPESFN_FLAGS),
|
||||
JS_FN("decrement", PointerType::Decrement, 0, CTYPESFN_FLAGS),
|
||||
@ -615,7 +615,7 @@ static const JSPropertySpec sPointerInstanceProps[] = {
|
||||
{ 0, 0, 0, JSOP_NULLWRAPPER, JSOP_NULLWRAPPER }
|
||||
};
|
||||
|
||||
static JSFunctionSpec sArrayFunction =
|
||||
static const JSFunctionSpec sArrayFunction =
|
||||
JS_FN("ArrayType", ArrayType::Create, 1, CTYPESCTOR_FLAGS);
|
||||
|
||||
static const JSPropertySpec sArrayProps[] = {
|
||||
@ -626,7 +626,7 @@ static const JSPropertySpec sArrayProps[] = {
|
||||
{ 0, 0, 0, JSOP_NULLWRAPPER, JSOP_NULLWRAPPER }
|
||||
};
|
||||
|
||||
static JSFunctionSpec sArrayInstanceFunctions[] = {
|
||||
static const JSFunctionSpec sArrayInstanceFunctions[] = {
|
||||
JS_FN("addressOfElement", ArrayType::AddressOfElement, 1, CDATAFN_FLAGS),
|
||||
JS_FS_END
|
||||
};
|
||||
@ -637,7 +637,7 @@ static const JSPropertySpec sArrayInstanceProps[] = {
|
||||
{ 0, 0, 0, JSOP_NULLWRAPPER, JSOP_NULLWRAPPER }
|
||||
};
|
||||
|
||||
static JSFunctionSpec sStructFunction =
|
||||
static const JSFunctionSpec sStructFunction =
|
||||
JS_FN("StructType", StructType::Create, 2, CTYPESCTOR_FLAGS);
|
||||
|
||||
static const JSPropertySpec sStructProps[] = {
|
||||
@ -646,17 +646,17 @@ static const JSPropertySpec sStructProps[] = {
|
||||
{ 0, 0, 0, JSOP_NULLWRAPPER, JSOP_NULLWRAPPER }
|
||||
};
|
||||
|
||||
static JSFunctionSpec sStructFunctions[] = {
|
||||
static const JSFunctionSpec sStructFunctions[] = {
|
||||
JS_FN("define", StructType::Define, 1, CDATAFN_FLAGS),
|
||||
JS_FS_END
|
||||
};
|
||||
|
||||
static JSFunctionSpec sStructInstanceFunctions[] = {
|
||||
static const JSFunctionSpec sStructInstanceFunctions[] = {
|
||||
JS_FN("addressOfField", StructType::AddressOfField, 1, CDATAFN_FLAGS),
|
||||
JS_FS_END
|
||||
};
|
||||
|
||||
static JSFunctionSpec sFunctionFunction =
|
||||
static const JSFunctionSpec sFunctionFunction =
|
||||
JS_FN("FunctionType", FunctionType::Create, 2, CTYPESCTOR_FLAGS);
|
||||
|
||||
static const JSPropertySpec sFunctionProps[] = {
|
||||
@ -671,7 +671,7 @@ static const JSPropertySpec sFunctionProps[] = {
|
||||
{ 0, 0, 0, JSOP_NULLWRAPPER, JSOP_NULLWRAPPER }
|
||||
};
|
||||
|
||||
static JSFunctionSpec sFunctionInstanceFunctions[] = {
|
||||
static const JSFunctionSpec sFunctionInstanceFunctions[] = {
|
||||
JS_FN("call", js_fun_call, 1, CDATAFN_FLAGS),
|
||||
JS_FN("apply", js_fun_apply, 2, CDATAFN_FLAGS),
|
||||
JS_FS_END
|
||||
@ -705,7 +705,7 @@ static JSClass sUInt64Class = {
|
||||
JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, Int64Base::Finalize
|
||||
};
|
||||
|
||||
static JSFunctionSpec sInt64StaticFunctions[] = {
|
||||
static const JSFunctionSpec sInt64StaticFunctions[] = {
|
||||
JS_FN("compare", Int64::Compare, 2, CTYPESFN_FLAGS),
|
||||
JS_FN("lo", Int64::Lo, 1, CTYPESFN_FLAGS),
|
||||
JS_FN("hi", Int64::Hi, 1, CTYPESFN_FLAGS),
|
||||
@ -713,7 +713,7 @@ static JSFunctionSpec sInt64StaticFunctions[] = {
|
||||
JS_FS_END
|
||||
};
|
||||
|
||||
static JSFunctionSpec sUInt64StaticFunctions[] = {
|
||||
static const JSFunctionSpec sUInt64StaticFunctions[] = {
|
||||
JS_FN("compare", UInt64::Compare, 2, CTYPESFN_FLAGS),
|
||||
JS_FN("lo", UInt64::Lo, 1, CTYPESFN_FLAGS),
|
||||
JS_FN("hi", UInt64::Hi, 1, CTYPESFN_FLAGS),
|
||||
@ -721,13 +721,13 @@ static JSFunctionSpec sUInt64StaticFunctions[] = {
|
||||
JS_FS_END
|
||||
};
|
||||
|
||||
static JSFunctionSpec sInt64Functions[] = {
|
||||
static const JSFunctionSpec sInt64Functions[] = {
|
||||
JS_FN("toString", Int64::ToString, 0, CTYPESFN_FLAGS),
|
||||
JS_FN("toSource", Int64::ToSource, 0, CTYPESFN_FLAGS),
|
||||
JS_FS_END
|
||||
};
|
||||
|
||||
static JSFunctionSpec sUInt64Functions[] = {
|
||||
static const JSFunctionSpec sUInt64Functions[] = {
|
||||
JS_FN("toString", UInt64::ToString, 0, CTYPESFN_FLAGS),
|
||||
JS_FN("toSource", UInt64::ToSource, 0, CTYPESFN_FLAGS),
|
||||
JS_FS_END
|
||||
@ -743,7 +743,7 @@ static const JSPropertySpec sModuleProps[] = {
|
||||
{ 0, 0, 0, JSOP_NULLWRAPPER, JSOP_NULLWRAPPER }
|
||||
};
|
||||
|
||||
static JSFunctionSpec sModuleFunctions[] = {
|
||||
static const JSFunctionSpec sModuleFunctions[] = {
|
||||
JS_FN("CDataFinalizer", CDataFinalizer::Construct, 2, CTYPESFN_FLAGS),
|
||||
JS_FN("open", Library::Open, 1, CTYPESFN_FLAGS),
|
||||
JS_FN("cast", CData::Cast, 2, CTYPESFN_FLAGS),
|
||||
|
@ -41,7 +41,7 @@ static JSClass sLibraryClass = {
|
||||
#define CTYPESFN_FLAGS \
|
||||
(JSPROP_ENUMERATE | JSPROP_READONLY | JSPROP_PERMANENT)
|
||||
|
||||
static JSFunctionSpec sLibraryFunctions[] = {
|
||||
static const JSFunctionSpec sLibraryFunctions[] = {
|
||||
JS_FN("close", Library::Close, 0, CTYPESFN_FLAGS),
|
||||
JS_FN("declare", Library::Declare, 0, CTYPESFN_FLAGS),
|
||||
JS_FS_END
|
||||
|
@ -50,7 +50,7 @@ static JSBool test_fn(JSContext *cx, unsigned argc, jsval *vp)
|
||||
return JS_TRUE;
|
||||
}
|
||||
|
||||
static JSFunctionSpec ptestFunctions[] = {
|
||||
static const JSFunctionSpec ptestFunctions[] = {
|
||||
JS_FS( "test_fn", test_fn, 0, 0 ),
|
||||
JS_FS_END
|
||||
};
|
||||
|
@ -42,7 +42,7 @@ createMyObject(JSContext* context, unsigned argc, jsval *vp)
|
||||
return JS_TRUE;
|
||||
}
|
||||
|
||||
static JSFunctionSpec s_functions[] =
|
||||
static const JSFunctionSpec s_functions[] =
|
||||
{
|
||||
JS_FN("createMyObject", createMyObject, 0, 0),
|
||||
JS_FS_END
|
||||
|
@ -70,7 +70,7 @@ Prof(JSContext* cx, unsigned argc, jsval *vp)
|
||||
return JS_TRUE;
|
||||
}
|
||||
|
||||
static JSFunctionSpec ptestFunctions[] = {
|
||||
static const JSFunctionSpec ptestFunctions[] = {
|
||||
JS_FS("test_fn", test_fn, 0, 0),
|
||||
JS_FS("test_fn2", test_fn2, 0, 0),
|
||||
JS_FS("enable", enable, 0, 0),
|
||||
|
@ -5023,7 +5023,7 @@ js_generic_native_method_dispatcher(JSContext *cx, unsigned argc, Value *vp)
|
||||
{
|
||||
CallArgs args = CallArgsFromVp(argc, vp);
|
||||
|
||||
JSFunctionSpec *fs = (JSFunctionSpec *)
|
||||
const JSFunctionSpec *fs = (JSFunctionSpec *)
|
||||
vp->toObject().toFunction()->getExtendedSlot(0).toPrivate();
|
||||
JS_ASSERT((fs->flags & JSFUN_GENERIC_NATIVE) != 0);
|
||||
|
||||
|
@ -2535,7 +2535,7 @@ array_isArray(JSContext *cx, unsigned argc, Value *vp)
|
||||
|
||||
#define GENERIC JSFUN_GENERIC_NATIVE
|
||||
|
||||
static JSFunctionSpec array_methods[] = {
|
||||
static const JSFunctionSpec array_methods[] = {
|
||||
#if JS_HAS_TOSOURCE
|
||||
JS_FN(js_toSource_str, array_toSource, 0,0),
|
||||
#endif
|
||||
@ -2570,7 +2570,7 @@ static JSFunctionSpec array_methods[] = {
|
||||
JS_FS_END
|
||||
};
|
||||
|
||||
static JSFunctionSpec array_static_methods[] = {
|
||||
static const JSFunctionSpec array_static_methods[] = {
|
||||
JS_FN("isArray", array_isArray, 1,0),
|
||||
{"lastIndexOf", {NULL, NULL}, 2,0, "ArrayStaticLastIndexOf"},
|
||||
{"indexOf", {NULL, NULL}, 2,0, "ArrayStaticIndexOf"},
|
||||
|
@ -118,7 +118,7 @@ bool_valueOf(JSContext *cx, unsigned argc, Value *vp)
|
||||
return CallNonGenericMethod<IsBoolean, bool_valueOf_impl>(cx, args);
|
||||
}
|
||||
|
||||
static JSFunctionSpec boolean_methods[] = {
|
||||
static const JSFunctionSpec boolean_methods[] = {
|
||||
#if JS_HAS_TOSOURCE
|
||||
JS_FN(js_toSource_str, bool_toSource, 0, 0),
|
||||
#endif
|
||||
|
@ -2986,14 +2986,14 @@ date_valueOf(JSContext *cx, unsigned argc, Value *vp)
|
||||
return CallNonGenericMethod<IsDate, date_valueOf_impl>(cx, args);
|
||||
}
|
||||
|
||||
static JSFunctionSpec date_static_methods[] = {
|
||||
static const JSFunctionSpec date_static_methods[] = {
|
||||
JS_FN("UTC", date_UTC, MAXARGS,0),
|
||||
JS_FN("parse", date_parse, 1,0),
|
||||
JS_FN("now", date_now, 0,0),
|
||||
JS_FS_END
|
||||
};
|
||||
|
||||
static JSFunctionSpec date_methods[] = {
|
||||
static const JSFunctionSpec date_methods[] = {
|
||||
JS_FN("getTime", date_getTime, 0,0),
|
||||
JS_FN("getTimezoneOffset", date_getTimezoneOffset, 0,0),
|
||||
JS_FN("getYear", date_getYear, 0,0),
|
||||
|
@ -765,7 +765,7 @@ exn_toSource(JSContext *cx, unsigned argc, Value *vp)
|
||||
}
|
||||
#endif
|
||||
|
||||
static JSFunctionSpec exception_methods[] = {
|
||||
static const JSFunctionSpec exception_methods[] = {
|
||||
#if JS_HAS_TOSOURCE
|
||||
JS_FN(js_toSource_str, exn_toSource, 0,0),
|
||||
#endif
|
||||
|
@ -1102,7 +1102,7 @@ bool
|
||||
JSFunction::initializeLazyScript(JSContext *cx)
|
||||
{
|
||||
JS_ASSERT(isInterpretedLazy());
|
||||
JSFunctionSpec *fs = static_cast<JSFunctionSpec *>(getExtendedSlot(0).toPrivate());
|
||||
const JSFunctionSpec *fs = static_cast<JSFunctionSpec *>(getExtendedSlot(0).toPrivate());
|
||||
Rooted<JSFunction*> self(cx, this);
|
||||
RootedAtom funAtom(cx, Atomize(cx, fs->selfHostedName, strlen(fs->selfHostedName)));
|
||||
if (!funAtom)
|
||||
@ -1267,7 +1267,7 @@ OnBadFormal(JSContext *cx, TokenKind tt)
|
||||
return false;
|
||||
}
|
||||
|
||||
JSFunctionSpec js::function_methods[] = {
|
||||
const JSFunctionSpec js::function_methods[] = {
|
||||
#if JS_HAS_TOSOURCE
|
||||
JS_FN(js_toSource_str, fun_toSource, 0,0),
|
||||
#endif
|
||||
|
@ -440,7 +440,7 @@ ReportIncompatible(JSContext *cx, CallReceiver call);
|
||||
JSBool
|
||||
CallOrConstructBoundFunction(JSContext *, unsigned, js::Value *);
|
||||
|
||||
extern JSFunctionSpec function_methods[];
|
||||
extern const JSFunctionSpec function_methods[];
|
||||
|
||||
} /* namespace js */
|
||||
|
||||
|
@ -795,7 +795,7 @@ iterator_next(JSContext *cx, unsigned argc, Value *vp)
|
||||
return CallNonGenericMethod<IsIterator, iterator_next_impl>(cx, args);
|
||||
}
|
||||
|
||||
static JSFunctionSpec iterator_methods[] = {
|
||||
static const JSFunctionSpec iterator_methods[] = {
|
||||
JS_FN("iterator", iterator_iterator, 0, 0),
|
||||
JS_FN("next", iterator_next, 0, 0),
|
||||
JS_FS_END
|
||||
@ -948,7 +948,7 @@ Class js::ElementIteratorClass = {
|
||||
NULL /* finalize */
|
||||
};
|
||||
|
||||
JSFunctionSpec ElementIteratorObject::methods[] = {
|
||||
const JSFunctionSpec ElementIteratorObject::methods[] = {
|
||||
JS_FN("next", next, 0, 0),
|
||||
JS_FS_END
|
||||
};
|
||||
@ -1744,7 +1744,7 @@ generator_close(JSContext *cx, unsigned argc, Value *vp)
|
||||
|
||||
#define JSPROP_ROPERM (JSPROP_READONLY | JSPROP_PERMANENT)
|
||||
|
||||
static JSFunctionSpec generator_methods[] = {
|
||||
static const JSFunctionSpec generator_methods[] = {
|
||||
JS_FN("iterator", iterator_iterator, 0, 0),
|
||||
JS_FN("next", generator_next, 0,JSPROP_ROPERM),
|
||||
JS_FN("send", generator_send, 1,JSPROP_ROPERM),
|
||||
|
@ -144,7 +144,7 @@ class ElementIteratorObject : public JSObject
|
||||
{
|
||||
public:
|
||||
static JSObject *create(JSContext *cx, Handle<Value> target);
|
||||
static JSFunctionSpec methods[];
|
||||
static const JSFunctionSpec methods[];
|
||||
|
||||
enum {
|
||||
TargetSlot,
|
||||
|
@ -702,7 +702,7 @@ math_toSource(JSContext *cx, unsigned argc, Value *vp)
|
||||
}
|
||||
#endif
|
||||
|
||||
static JSFunctionSpec math_static_methods[] = {
|
||||
static const JSFunctionSpec math_static_methods[] = {
|
||||
#if JS_HAS_TOSOURCE
|
||||
JS_FN(js_toSource_str, math_toSource, 0, 0),
|
||||
#endif
|
||||
|
@ -397,7 +397,7 @@ js::num_parseInt(JSContext *cx, unsigned argc, Value *vp)
|
||||
return true;
|
||||
}
|
||||
|
||||
static JSFunctionSpec number_functions[] = {
|
||||
static const JSFunctionSpec number_functions[] = {
|
||||
JS_FN(js_isNaN_str, num_isNaN, 1,0),
|
||||
JS_FN(js_isFinite_str, num_isFinite, 1,0),
|
||||
JS_FN(js_parseFloat_str, num_parseFloat, 1,0),
|
||||
@ -891,7 +891,7 @@ num_toPrecision(JSContext *cx, unsigned argc, Value *vp)
|
||||
return CallNonGenericMethod<IsNumber, num_toPrecision_impl>(cx, args);
|
||||
}
|
||||
|
||||
static JSFunctionSpec number_methods[] = {
|
||||
static const JSFunctionSpec number_methods[] = {
|
||||
#if JS_HAS_TOSOURCE
|
||||
JS_FN(js_toSource_str, num_toSource, 0, 0),
|
||||
#endif
|
||||
@ -969,7 +969,7 @@ Number_toInteger(JSContext *cx, unsigned argc, Value *vp)
|
||||
}
|
||||
|
||||
|
||||
static JSFunctionSpec number_static_methods[] = {
|
||||
static const JSFunctionSpec number_static_methods[] = {
|
||||
JS_FN("isFinite", Number_isFinite, 1, 0),
|
||||
JS_FN("isInteger", Number_isInteger, 1, 0),
|
||||
JS_FN("isNaN", Number_isNaN, 1, 0),
|
||||
|
@ -879,7 +879,7 @@ json_toSource(JSContext *cx, unsigned argc, Value *vp)
|
||||
}
|
||||
#endif
|
||||
|
||||
static JSFunctionSpec json_static_methods[] = {
|
||||
static const JSFunctionSpec json_static_methods[] = {
|
||||
#if JS_HAS_TOSOURCE
|
||||
JS_FN(js_toSource_str, json_toSource, 0, 0),
|
||||
#endif
|
||||
|
@ -3443,7 +3443,7 @@ proxy_createFunction(JSContext *cx, unsigned argc, Value *vp)
|
||||
return true;
|
||||
}
|
||||
|
||||
static JSFunctionSpec static_methods[] = {
|
||||
static const JSFunctionSpec static_methods[] = {
|
||||
JS_FN("create", proxy_create, 2, 0),
|
||||
JS_FN("createFunction", proxy_createFunction, 3, 0),
|
||||
JS_FS_END
|
||||
|
@ -3094,7 +3094,7 @@ reflect_parse(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
return JS_TRUE;
|
||||
}
|
||||
|
||||
static JSFunctionSpec static_methods[] = {
|
||||
static const JSFunctionSpec static_methods[] = {
|
||||
JS_FN("parse", reflect_parse, 1, 0),
|
||||
JS_FS_END
|
||||
};
|
||||
|
@ -353,7 +353,7 @@ str_uneval(JSContext *cx, unsigned argc, Value *vp)
|
||||
}
|
||||
#endif
|
||||
|
||||
static JSFunctionSpec string_functions[] = {
|
||||
static const JSFunctionSpec string_functions[] = {
|
||||
JS_FN(js_escape_str, str_escape, 1,0),
|
||||
JS_FN(js_unescape_str, str_unescape, 1,0),
|
||||
#if JS_HAS_UNEVAL
|
||||
@ -3356,7 +3356,7 @@ str_sub(JSContext *cx, unsigned argc, Value *vp)
|
||||
}
|
||||
#endif /* JS_HAS_STR_HTML_HELPERS */
|
||||
|
||||
static JSFunctionSpec string_methods[] = {
|
||||
static const JSFunctionSpec string_methods[] = {
|
||||
#if JS_HAS_TOSOURCE
|
||||
JS_FN("quote", str_quote, 0,JSFUN_GENERIC_NATIVE),
|
||||
JS_FN(js_toSource_str, str_toSource, 0,0),
|
||||
@ -3482,7 +3482,7 @@ js::str_fromCharCode(JSContext *cx, unsigned argc, Value *vp)
|
||||
return JS_TRUE;
|
||||
}
|
||||
|
||||
static JSFunctionSpec string_static_methods[] = {
|
||||
static const JSFunctionSpec string_static_methods[] = {
|
||||
JS_FN("fromCharCode", js::str_fromCharCode, 1, 0),
|
||||
|
||||
// This must be at the end because of bug 853075: functions listed after
|
||||
|
@ -2536,55 +2536,55 @@ class Int8Array : public TypedArrayTemplate<int8_t> {
|
||||
public:
|
||||
enum { ACTUAL_TYPE = TYPE_INT8 };
|
||||
static const JSProtoKey key = JSProto_Int8Array;
|
||||
static JSFunctionSpec jsfuncs[];
|
||||
static const JSFunctionSpec jsfuncs[];
|
||||
};
|
||||
class Uint8Array : public TypedArrayTemplate<uint8_t> {
|
||||
public:
|
||||
enum { ACTUAL_TYPE = TYPE_UINT8 };
|
||||
static const JSProtoKey key = JSProto_Uint8Array;
|
||||
static JSFunctionSpec jsfuncs[];
|
||||
static const JSFunctionSpec jsfuncs[];
|
||||
};
|
||||
class Int16Array : public TypedArrayTemplate<int16_t> {
|
||||
public:
|
||||
enum { ACTUAL_TYPE = TYPE_INT16 };
|
||||
static const JSProtoKey key = JSProto_Int16Array;
|
||||
static JSFunctionSpec jsfuncs[];
|
||||
static const JSFunctionSpec jsfuncs[];
|
||||
};
|
||||
class Uint16Array : public TypedArrayTemplate<uint16_t> {
|
||||
public:
|
||||
enum { ACTUAL_TYPE = TYPE_UINT16 };
|
||||
static const JSProtoKey key = JSProto_Uint16Array;
|
||||
static JSFunctionSpec jsfuncs[];
|
||||
static const JSFunctionSpec jsfuncs[];
|
||||
};
|
||||
class Int32Array : public TypedArrayTemplate<int32_t> {
|
||||
public:
|
||||
enum { ACTUAL_TYPE = TYPE_INT32 };
|
||||
static const JSProtoKey key = JSProto_Int32Array;
|
||||
static JSFunctionSpec jsfuncs[];
|
||||
static const JSFunctionSpec jsfuncs[];
|
||||
};
|
||||
class Uint32Array : public TypedArrayTemplate<uint32_t> {
|
||||
public:
|
||||
enum { ACTUAL_TYPE = TYPE_UINT32 };
|
||||
static const JSProtoKey key = JSProto_Uint32Array;
|
||||
static JSFunctionSpec jsfuncs[];
|
||||
static const JSFunctionSpec jsfuncs[];
|
||||
};
|
||||
class Float32Array : public TypedArrayTemplate<float> {
|
||||
public:
|
||||
enum { ACTUAL_TYPE = TYPE_FLOAT32 };
|
||||
static const JSProtoKey key = JSProto_Float32Array;
|
||||
static JSFunctionSpec jsfuncs[];
|
||||
static const JSFunctionSpec jsfuncs[];
|
||||
};
|
||||
class Float64Array : public TypedArrayTemplate<double> {
|
||||
public:
|
||||
enum { ACTUAL_TYPE = TYPE_FLOAT64 };
|
||||
static const JSProtoKey key = JSProto_Float64Array;
|
||||
static JSFunctionSpec jsfuncs[];
|
||||
static const JSFunctionSpec jsfuncs[];
|
||||
};
|
||||
class Uint8ClampedArray : public TypedArrayTemplate<uint8_clamped> {
|
||||
public:
|
||||
enum { ACTUAL_TYPE = TYPE_UINT8_CLAMPED };
|
||||
static const JSProtoKey key = JSProto_Uint8ClampedArray;
|
||||
static JSFunctionSpec jsfuncs[];
|
||||
static const JSFunctionSpec jsfuncs[];
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
@ -3346,7 +3346,7 @@ Class js::ArrayBufferClass = {
|
||||
}
|
||||
};
|
||||
|
||||
JSFunctionSpec ArrayBufferObject::jsfuncs[] = {
|
||||
const JSFunctionSpec ArrayBufferObject::jsfuncs[] = {
|
||||
JS_FN("slice", ArrayBufferObject::fun_slice, 2, JSFUN_GENERIC_NATIVE),
|
||||
JS_FS_END
|
||||
};
|
||||
@ -3357,7 +3357,7 @@ JSFunctionSpec ArrayBufferObject::jsfuncs[] = {
|
||||
|
||||
#ifdef ENABLE_TYPEDARRAY_MOVE
|
||||
# define IMPL_TYPED_ARRAY_STATICS(_typedArray) \
|
||||
JSFunctionSpec _typedArray::jsfuncs[] = { \
|
||||
const JSFunctionSpec _typedArray::jsfuncs[] = { \
|
||||
JS_FN("iterator", JS_ArrayIterator, 0, 0), \
|
||||
JS_FN("subarray", _typedArray::fun_subarray, 2, JSFUN_GENERIC_NATIVE), \
|
||||
JS_FN("set", _typedArray::fun_set, 2, JSFUN_GENERIC_NATIVE), \
|
||||
@ -3366,7 +3366,7 @@ JSFunctionSpec _typedArray::jsfuncs[] = { \
|
||||
}
|
||||
#else
|
||||
# define IMPL_TYPED_ARRAY_STATICS(_typedArray) \
|
||||
JSFunctionSpec _typedArray::jsfuncs[] = { \
|
||||
const JSFunctionSpec _typedArray::jsfuncs[] = { \
|
||||
JS_FN("iterator", JS_ArrayIterator, 0, 0), \
|
||||
JS_FN("subarray", _typedArray::fun_subarray, 2, JSFUN_GENERIC_NATIVE), \
|
||||
JS_FN("set", _typedArray::fun_set, 2, JSFUN_GENERIC_NATIVE), \
|
||||
@ -3694,7 +3694,7 @@ Class js::DataViewClass = {
|
||||
JS_NULL_OBJECT_OPS
|
||||
};
|
||||
|
||||
JSFunctionSpec DataViewObject::jsfuncs[] = {
|
||||
const JSFunctionSpec DataViewObject::jsfuncs[] = {
|
||||
JS_FN("getInt8", DataViewObject::fun_getInt8, 1,0),
|
||||
JS_FN("getUint8", DataViewObject::fun_getUint8, 1,0),
|
||||
JS_FN("getInt16", DataViewObject::fun_getInt16, 2,0),
|
||||
|
@ -34,7 +34,7 @@ class ArrayBufferObject : public JSObject
|
||||
|
||||
public:
|
||||
static Class protoClass;
|
||||
static JSFunctionSpec jsfuncs[];
|
||||
static const JSFunctionSpec jsfuncs[];
|
||||
|
||||
static JSBool byteLengthGetter(JSContext *cx, unsigned argc, Value *vp);
|
||||
|
||||
@ -438,7 +438,7 @@ private:
|
||||
static bool write(JSContext *cx, Handle<DataViewObject*> obj,
|
||||
CallArgs &args, const char *method);
|
||||
private:
|
||||
static JSFunctionSpec jsfuncs[];
|
||||
static const JSFunctionSpec jsfuncs[];
|
||||
};
|
||||
|
||||
bool
|
||||
|
@ -412,7 +412,7 @@ Class js::WeakMapClass = {
|
||||
WeakMap_mark
|
||||
};
|
||||
|
||||
static JSFunctionSpec weak_map_methods[] = {
|
||||
static const JSFunctionSpec weak_map_methods[] = {
|
||||
JS_FN("has", WeakMap_has, 1, 0),
|
||||
JS_FN("get", WeakMap_get, 2, 0),
|
||||
JS_FN("delete", WeakMap_delete, 1, 0),
|
||||
|
@ -91,7 +91,7 @@ pm_canMeasureSomething(JSContext* cx, unsigned /*unused*/, jsval* vp)
|
||||
}
|
||||
|
||||
const uint8_t PM_FATTRS = JSPROP_READONLY | JSPROP_PERMANENT;
|
||||
static JSFunctionSpec pm_fns[] = {
|
||||
static const JSFunctionSpec pm_fns[] = {
|
||||
JS_FN("start", pm_start, 0, PM_FATTRS),
|
||||
JS_FN("stop", pm_stop, 0, PM_FATTRS),
|
||||
JS_FN("reset", pm_reset, 0, PM_FATTRS),
|
||||
|
@ -4603,7 +4603,7 @@ static const JSPropertySpec dom_props[] = {
|
||||
{NULL,0,0,JSOP_NULLWRAPPER, JSOP_NULLWRAPPER}
|
||||
};
|
||||
|
||||
static JSFunctionSpec dom_methods[] = {
|
||||
static const JSFunctionSpec dom_methods[] = {
|
||||
JS_FNINFO("doFoo", dom_genericMethod, &doFoo_methodinfo, 3, JSPROP_ENUMERATE),
|
||||
JS_FS_END
|
||||
};
|
||||
|
@ -2650,7 +2650,7 @@ const JSPropertySpec Debugger::properties[] = {
|
||||
JS_PS_END
|
||||
};
|
||||
|
||||
JSFunctionSpec Debugger::methods[] = {
|
||||
const JSFunctionSpec Debugger::methods[] = {
|
||||
JS_FN("addDebuggee", Debugger::addDebuggee, 1, 0),
|
||||
JS_FN("addAllGlobalsAsDebuggees", Debugger::addAllGlobalsAsDebuggees, 0, 0),
|
||||
JS_FN("removeDebuggee", Debugger::removeDebuggee, 1, 0),
|
||||
@ -3465,7 +3465,7 @@ static const JSPropertySpec DebuggerScript_properties[] = {
|
||||
JS_PS_END
|
||||
};
|
||||
|
||||
static JSFunctionSpec DebuggerScript_methods[] = {
|
||||
static const JSFunctionSpec DebuggerScript_methods[] = {
|
||||
JS_FN("getChildScripts", DebuggerScript_getChildScripts, 0, 0),
|
||||
JS_FN("getAllOffsets", DebuggerScript_getAllOffsets, 0, 0),
|
||||
JS_FN("getAllColumnOffsets", DebuggerScript_getAllColumnOffsets, 0, 0),
|
||||
@ -4066,7 +4066,7 @@ static const JSPropertySpec DebuggerFrame_properties[] = {
|
||||
JS_PS_END
|
||||
};
|
||||
|
||||
static JSFunctionSpec DebuggerFrame_methods[] = {
|
||||
static const JSFunctionSpec DebuggerFrame_methods[] = {
|
||||
JS_FN("eval", DebuggerFrame_eval, 1, 0),
|
||||
JS_FN("evalWithBindings", DebuggerFrame_evalWithBindings, 1, 0),
|
||||
JS_FS_END
|
||||
@ -4842,7 +4842,7 @@ static const JSPropertySpec DebuggerObject_properties[] = {
|
||||
JS_PS_END
|
||||
};
|
||||
|
||||
static JSFunctionSpec DebuggerObject_methods[] = {
|
||||
static const JSFunctionSpec DebuggerObject_methods[] = {
|
||||
JS_FN("getOwnPropertyDescriptor", DebuggerObject_getOwnPropertyDescriptor, 1, 0),
|
||||
JS_FN("getOwnPropertyNames", DebuggerObject_getOwnPropertyNames, 0, 0),
|
||||
JS_FN("defineProperty", DebuggerObject_defineProperty, 2, 0),
|
||||
@ -5175,7 +5175,7 @@ static const JSPropertySpec DebuggerEnv_properties[] = {
|
||||
JS_PS_END
|
||||
};
|
||||
|
||||
static JSFunctionSpec DebuggerEnv_methods[] = {
|
||||
static const JSFunctionSpec DebuggerEnv_methods[] = {
|
||||
JS_FN("names", DebuggerEnv_names, 0, 0),
|
||||
JS_FN("find", DebuggerEnv_find, 1, 0),
|
||||
JS_FN("getVariable", DebuggerEnv_getVariable, 1, 0),
|
||||
|
@ -324,7 +324,7 @@ class Debugger : private mozilla::LinkedListElement<Debugger>
|
||||
static JSBool wrap(JSContext *cx, unsigned argc, Value *vp);
|
||||
static JSBool construct(JSContext *cx, unsigned argc, Value *vp);
|
||||
static const JSPropertySpec properties[];
|
||||
static JSFunctionSpec methods[];
|
||||
static const JSFunctionSpec methods[];
|
||||
|
||||
JSObject *getHook(Hook hook) const;
|
||||
bool hasAnyLiveHooks() const;
|
||||
|
@ -462,7 +462,7 @@ intrinsic_RuntimeDefaultLocale(JSContext *cx, unsigned argc, Value *vp)
|
||||
return true;
|
||||
}
|
||||
|
||||
JSFunctionSpec intrinsic_functions[] = {
|
||||
const JSFunctionSpec intrinsic_functions[] = {
|
||||
JS_FN("ToObject", intrinsic_ToObject, 1,0),
|
||||
JS_FN("ToInteger", intrinsic_ToInteger, 1,0),
|
||||
JS_FN("IsCallable", intrinsic_IsCallable, 1,0),
|
||||
|
@ -326,7 +326,7 @@ Blob(JSContext *cx, unsigned argc, jsval *vp)
|
||||
return true;
|
||||
}
|
||||
|
||||
static JSFunctionSpec gGlobalFun[] = {
|
||||
static const JSFunctionSpec gGlobalFun[] = {
|
||||
JS_FS("dump", Dump, 1,0),
|
||||
JS_FS("debug", Debug, 1,0),
|
||||
JS_FS("atob", Atob, 1,0),
|
||||
|
@ -821,7 +821,7 @@ Btoa(JSContext *cx, unsigned argc, jsval *vp)
|
||||
return xpc::Base64Encode(cx, JS_ARGV(cx, vp)[0], &JS_RVAL(cx, vp));
|
||||
}
|
||||
|
||||
static JSFunctionSpec glob_functions[] = {
|
||||
static const JSFunctionSpec glob_functions[] = {
|
||||
JS_FS("print", Print, 0,0),
|
||||
JS_FS("readline", ReadLine, 1,0),
|
||||
JS_FS("load", Load, 1,0),
|
||||
|
@ -3057,7 +3057,7 @@ static JSClass SandboxClass = {
|
||||
NULL, NULL, NULL, NULL, TraceXPCGlobal
|
||||
};
|
||||
|
||||
static JSFunctionSpec SandboxFunctions[] = {
|
||||
static const JSFunctionSpec SandboxFunctions[] = {
|
||||
JS_FS("dump", SandboxDump, 1,0),
|
||||
JS_FS("debug", SandboxDebug, 1,0),
|
||||
JS_FS("importFunction", SandboxImport, 1,0),
|
||||
|
@ -447,7 +447,7 @@ JSBool PACProxyAlert(JSContext *cx, unsigned int argc, JS::Value *vp)
|
||||
return true;
|
||||
}
|
||||
|
||||
static JSFunctionSpec PACGlobalFunctions[] = {
|
||||
static const JSFunctionSpec PACGlobalFunctions[] = {
|
||||
JS_FS("dnsResolve", PACDnsResolve, 1, 0),
|
||||
JS_FS("myIpAddress", PACMyIpAddress, 0, 0),
|
||||
JS_FS("alert", PACProxyAlert, 1, 0),
|
||||
|
Loading…
Reference in New Issue
Block a user