Bug 1451658 - Remove JS_STATIC_CLASS in favour of MOZ_STATIC_CLASS. r=mystor

MozReview-Commit-ID: B2fynvjOSG7

--HG--
extra : rebase_source : 8f2ca40231561e5c7a140bad4f7fe79c89aeef04
This commit is contained in:
Nicholas Nethercote 2018-04-10 17:31:55 +10:00
parent 374e333b76
commit fe6068a327

View File

@ -9,6 +9,8 @@
#ifndef js_Class_h
#define js_Class_h
#include "mozilla/Attributes.h"
#include "jstypes.h"
#include "js/CallArgs.h"
@ -611,12 +613,7 @@ typedef void
cOps->trace(trc, obj); \
}
// XXX: MOZ_NONHEAP_CLASS allows objects to be created statically or on the
// stack. We actually want to ban stack objects too, but that's currently not
// possible. So we define JS_STATIC_CLASS to make the intention clearer.
#define JS_STATIC_CLASS MOZ_NONHEAP_CLASS
struct JS_STATIC_CLASS ClassOps
struct MOZ_STATIC_CLASS ClassOps
{
/* Function pointer members (may be null). */
JSAddPropertyOp addProperty;
@ -641,7 +638,7 @@ typedef bool (*FinishClassInitOp)(JSContext* cx, JS::HandleObject ctor,
const size_t JSCLASS_CACHED_PROTO_WIDTH = 6;
struct JS_STATIC_CLASS ClassSpec
struct MOZ_STATIC_CLASS ClassSpec
{
ClassObjectCreationOp createConstructor;
ClassObjectCreationOp createPrototype;
@ -677,7 +674,7 @@ struct JS_STATIC_CLASS ClassSpec
}
};
struct JS_STATIC_CLASS ClassExtension
struct MOZ_STATIC_CLASS ClassExtension
{
/**
* If an object is used as a key in a weakmap, it may be desirable for the
@ -716,7 +713,7 @@ struct JS_STATIC_CLASS ClassExtension
#define JS_NULL_CLASS_SPEC nullptr
#define JS_NULL_CLASS_EXT nullptr
struct JS_STATIC_CLASS ObjectOps
struct MOZ_STATIC_CLASS ObjectOps
{
LookupPropertyOp lookupProperty;
DefinePropertyOp defineProperty;
@ -737,7 +734,7 @@ struct JS_STATIC_CLASS ObjectOps
typedef void (*JSClassInternal)();
struct JS_STATIC_CLASS JSClassOps
struct MOZ_STATIC_CLASS JSClassOps
{
/* Function pointer members (may be null). */
JSAddPropertyOp addProperty;
@ -867,7 +864,7 @@ static const uint32_t JSCLASS_CACHED_PROTO_MASK = JS_BITMASK(js::JSCLASS_CACHED_
namespace js {
struct JS_STATIC_CLASS Class
struct MOZ_STATIC_CLASS Class
{
JS_CLASS_MEMBERS(js::ClassOps, FreeOp);
const ClassSpec* spec;