зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1573508
- Replace internal references to js::ClassOps with JSClassOps and remove the alias r=tcampbell
Another big patch. This a search-and-replace followed by mach clang-format, and removal of the js::ClassOps alias from Class.h. Differential Revision: https://phabricator.services.mozilla.com/D41761 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
d23ec38129
Коммит
e22ceecec6
|
@ -849,8 +849,6 @@ static const uint32_t JSCLASS_CACHED_PROTO_MASK =
|
|||
|
||||
namespace js {
|
||||
|
||||
using ClassOps = JSClassOps;
|
||||
|
||||
struct MOZ_STATIC_CLASS Class {
|
||||
JS_CLASS_MEMBERS;
|
||||
const ClassSpec* spec;
|
||||
|
|
|
@ -76,18 +76,18 @@ class JS_FRIEND_API Wrapper;
|
|||
* very different kinds of object in SpiderMonkey.
|
||||
*
|
||||
* 1. Native objects cover most objects and contain both internal slots and
|
||||
* properties. ClassOps and ObjectOps may be used to override certain
|
||||
* properties. JSClassOps and ObjectOps may be used to override certain
|
||||
* default behaviors.
|
||||
*
|
||||
* 2. Proxy objects are composed of internal slots and a ProxyHandler. The
|
||||
* handler contains C++ methods that can implement these standard (and
|
||||
* non-standard) internal methods. ClassOps and ObjectOps for the base
|
||||
* non-standard) internal methods. JSClassOps and ObjectOps for the base
|
||||
* ProxyObject invoke the handler methods as appropriate.
|
||||
*
|
||||
* 3. Objects with custom layouts like TypedObjects. These rely on ClassOps
|
||||
* 3. Objects with custom layouts like TypedObjects. These rely on JSClassOps
|
||||
* and ObjectOps to implement internal methods.
|
||||
*
|
||||
* Native objects with custom ClassOps / ObjectOps are used when the object
|
||||
* Native objects with custom JSClassOps / ObjectOps are used when the object
|
||||
* behaves very similar to a normal object such as the ArrayObject and it's
|
||||
* length property. Most usages wrapping a C++ or other type should prefer
|
||||
* using a Proxy. Using the proxy approach makes it much easier to create an
|
||||
|
@ -694,7 +694,7 @@ inline void assertEnteredPolicy(JSContext* cx, JSObject* obj, jsid id,
|
|||
BaseProxyHandler::Action act) {}
|
||||
#endif
|
||||
|
||||
extern JS_FRIEND_DATA const js::ClassOps ProxyClassOps;
|
||||
extern JS_FRIEND_DATA const JSClassOps ProxyClassOps;
|
||||
extern JS_FRIEND_DATA const js::ClassExtension ProxyClassExtension;
|
||||
extern JS_FRIEND_DATA const js::ObjectOps ProxyObjectOps;
|
||||
|
||||
|
|
|
@ -3971,7 +3971,7 @@ static bool array_proto_finish(JSContext* cx, JS::HandleObject ctor,
|
|||
return DefineDataProperty(cx, proto, id, value, JSPROP_READONLY);
|
||||
}
|
||||
|
||||
static const ClassOps ArrayObjectClassOps = {
|
||||
static const JSClassOps ArrayObjectClassOps = {
|
||||
array_addProperty, nullptr, /* delProperty */
|
||||
nullptr, /* enumerate */
|
||||
nullptr, /* resolve */
|
||||
|
|
|
@ -981,17 +981,17 @@ JSObject* DataViewObject::CreatePrototype(JSContext* cx, JSProtoKey key) {
|
|||
&DataViewObject::protoClass_);
|
||||
}
|
||||
|
||||
static const ClassOps DataViewObjectClassOps = {nullptr, /* addProperty */
|
||||
nullptr, /* delProperty */
|
||||
nullptr, /* enumerate */
|
||||
nullptr, /* newEnumerate */
|
||||
nullptr, /* resolve */
|
||||
nullptr, /* mayResolve */
|
||||
nullptr, /* finalize */
|
||||
nullptr, /* call */
|
||||
nullptr, /* hasInstance */
|
||||
nullptr, /* construct */
|
||||
ArrayBufferViewObject::trace};
|
||||
static const JSClassOps DataViewObjectClassOps = {nullptr, /* addProperty */
|
||||
nullptr, /* delProperty */
|
||||
nullptr, /* enumerate */
|
||||
nullptr, /* newEnumerate */
|
||||
nullptr, /* resolve */
|
||||
nullptr, /* mayResolve */
|
||||
nullptr, /* finalize */
|
||||
nullptr, /* call */
|
||||
nullptr, /* hasInstance */
|
||||
nullptr, /* construct */
|
||||
ArrayBufferViewObject::trace};
|
||||
|
||||
const ClassSpec DataViewObject::classSpec_ = {
|
||||
GenericCreateConstructor<DataViewObject::construct, 1,
|
||||
|
|
|
@ -124,13 +124,14 @@ HashableValue HashableValue::trace(JSTracer* trc) const {
|
|||
|
||||
namespace {} /* anonymous namespace */
|
||||
|
||||
static const ClassOps MapIteratorObjectClassOps = {nullptr, /* addProperty */
|
||||
nullptr, /* delProperty */
|
||||
nullptr, /* enumerate */
|
||||
nullptr, /* newEnumerate */
|
||||
nullptr, /* resolve */
|
||||
nullptr, /* mayResolve */
|
||||
MapIteratorObject::finalize};
|
||||
static const JSClassOps MapIteratorObjectClassOps = {
|
||||
nullptr, /* addProperty */
|
||||
nullptr, /* delProperty */
|
||||
nullptr, /* enumerate */
|
||||
nullptr, /* newEnumerate */
|
||||
nullptr, /* resolve */
|
||||
nullptr, /* mayResolve */
|
||||
MapIteratorObject::finalize};
|
||||
|
||||
static const ClassExtension MapIteratorObjectClassExtension = {
|
||||
MapIteratorObject::objectMoved};
|
||||
|
@ -370,17 +371,17 @@ JSObject* MapIteratorObject::createResultPair(JSContext* cx) {
|
|||
|
||||
/*** Map ********************************************************************/
|
||||
|
||||
const ClassOps MapObject::classOps_ = {nullptr, // addProperty
|
||||
nullptr, // delProperty
|
||||
nullptr, // enumerate
|
||||
nullptr, // newEnumerate
|
||||
nullptr, // resolve
|
||||
nullptr, // mayResolve
|
||||
finalize,
|
||||
nullptr, // call
|
||||
nullptr, // hasInstance
|
||||
nullptr, // construct
|
||||
trace};
|
||||
const JSClassOps MapObject::classOps_ = {nullptr, // addProperty
|
||||
nullptr, // delProperty
|
||||
nullptr, // enumerate
|
||||
nullptr, // newEnumerate
|
||||
nullptr, // resolve
|
||||
nullptr, // mayResolve
|
||||
finalize,
|
||||
nullptr, // call
|
||||
nullptr, // hasInstance
|
||||
nullptr, // construct
|
||||
trace};
|
||||
|
||||
const ClassSpec MapObject::classSpec_ = {
|
||||
GenericCreateConstructor<MapObject::construct, 0, gc::AllocKind::FUNCTION>,
|
||||
|
@ -905,13 +906,14 @@ bool MapObject::clear(JSContext* cx, HandleObject obj) {
|
|||
|
||||
/*** SetIterator ************************************************************/
|
||||
|
||||
static const ClassOps SetIteratorObjectClassOps = {nullptr, /* addProperty */
|
||||
nullptr, /* delProperty */
|
||||
nullptr, /* enumerate */
|
||||
nullptr, /* newEnumerate */
|
||||
nullptr, /* resolve */
|
||||
nullptr, /* mayResolve */
|
||||
SetIteratorObject::finalize};
|
||||
static const JSClassOps SetIteratorObjectClassOps = {
|
||||
nullptr, /* addProperty */
|
||||
nullptr, /* delProperty */
|
||||
nullptr, /* enumerate */
|
||||
nullptr, /* newEnumerate */
|
||||
nullptr, /* resolve */
|
||||
nullptr, /* mayResolve */
|
||||
SetIteratorObject::finalize};
|
||||
|
||||
static const ClassExtension SetIteratorObjectClassExtension = {
|
||||
SetIteratorObject::objectMoved};
|
||||
|
@ -1119,17 +1121,17 @@ JSObject* SetIteratorObject::createResult(JSContext* cx) {
|
|||
|
||||
/*** Set ********************************************************************/
|
||||
|
||||
const ClassOps SetObject::classOps_ = {nullptr, // addProperty
|
||||
nullptr, // delProperty
|
||||
nullptr, // enumerate
|
||||
nullptr, // newEnumerate
|
||||
nullptr, // resolve
|
||||
nullptr, // mayResolve
|
||||
finalize,
|
||||
nullptr, // call
|
||||
nullptr, // hasInstance
|
||||
nullptr, // construct
|
||||
trace};
|
||||
const JSClassOps SetObject::classOps_ = {nullptr, // addProperty
|
||||
nullptr, // delProperty
|
||||
nullptr, // enumerate
|
||||
nullptr, // newEnumerate
|
||||
nullptr, // resolve
|
||||
nullptr, // mayResolve
|
||||
finalize,
|
||||
nullptr, // call
|
||||
nullptr, // hasInstance
|
||||
nullptr, // construct
|
||||
trace};
|
||||
|
||||
const ClassSpec SetObject::classSpec_ = {
|
||||
GenericCreateConstructor<SetObject::construct, 0, gc::AllocKind::FUNCTION>,
|
||||
|
|
|
@ -143,7 +143,7 @@ class MapObject : public NativeObject {
|
|||
|
||||
private:
|
||||
static const ClassSpec classSpec_;
|
||||
static const ClassOps classOps_;
|
||||
static const JSClassOps classOps_;
|
||||
|
||||
static const JSPropertySpec properties[];
|
||||
static const JSFunctionSpec methods[];
|
||||
|
@ -257,7 +257,7 @@ class SetObject : public NativeObject {
|
|||
|
||||
private:
|
||||
static const ClassSpec classSpec_;
|
||||
static const ClassOps classOps_;
|
||||
static const JSClassOps classOps_;
|
||||
|
||||
static const JSPropertySpec properties[];
|
||||
static const JSFunctionSpec methods[];
|
||||
|
|
|
@ -702,7 +702,7 @@ void FunctionDeclaration::trace(JSTracer* trc) {
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// ModuleObject
|
||||
|
||||
/* static */ const ClassOps ModuleObject::classOps_ = {
|
||||
/* static */ const JSClassOps ModuleObject::classOps_ = {
|
||||
nullptr, /* addProperty */
|
||||
nullptr, /* delProperty */
|
||||
nullptr, /* enumerate */
|
||||
|
|
|
@ -319,7 +319,7 @@ class ModuleObject : public NativeObject {
|
|||
HandleObject exports);
|
||||
|
||||
private:
|
||||
static const ClassOps classOps_;
|
||||
static const JSClassOps classOps_;
|
||||
|
||||
static void trace(JSTracer* trc, JSObject* obj);
|
||||
static void finalize(JSFreeOp* fop, JSObject* obj);
|
||||
|
|
|
@ -3660,7 +3660,7 @@ static void ReadableByteStreamControllerFinalize(JSFreeOp* fop, JSObject* obj) {
|
|||
controller.externalSource()->finalize();
|
||||
}
|
||||
|
||||
static const ClassOps ReadableByteStreamControllerClassOps = {
|
||||
static const JSClassOps ReadableByteStreamControllerClassOps = {
|
||||
nullptr, /* addProperty */
|
||||
nullptr, /* delProperty */
|
||||
nullptr, /* enumerate */
|
||||
|
|
|
@ -439,7 +439,7 @@ static bool str_resolve(JSContext* cx, HandleObject obj, HandleId id,
|
|||
return true;
|
||||
}
|
||||
|
||||
static const ClassOps StringObjectClassOps = {
|
||||
static const JSClassOps StringObjectClassOps = {
|
||||
nullptr, /* addProperty */
|
||||
nullptr, /* delProperty */
|
||||
str_enumerate, nullptr, /* newEnumerate */
|
||||
|
|
|
@ -3152,13 +3152,14 @@ class CloneBufferObject : public NativeObject {
|
|||
}
|
||||
};
|
||||
|
||||
static const ClassOps CloneBufferObjectClassOps = {nullptr, /* addProperty */
|
||||
nullptr, /* delProperty */
|
||||
nullptr, /* enumerate */
|
||||
nullptr, /* newEnumerate */
|
||||
nullptr, /* resolve */
|
||||
nullptr, /* mayResolve */
|
||||
CloneBufferObject::Finalize};
|
||||
static const JSClassOps CloneBufferObjectClassOps = {
|
||||
nullptr, /* addProperty */
|
||||
nullptr, /* delProperty */
|
||||
nullptr, /* enumerate */
|
||||
nullptr, /* newEnumerate */
|
||||
nullptr, /* resolve */
|
||||
nullptr, /* mayResolve */
|
||||
CloneBufferObject::Finalize};
|
||||
|
||||
const Class CloneBufferObject::class_ = {
|
||||
"CloneBuffer",
|
||||
|
|
|
@ -205,14 +205,14 @@ const Class js::TypedProto::class_ = {
|
|||
* distinguish which scalar type object this actually is.
|
||||
*/
|
||||
|
||||
static const ClassOps ScalarTypeDescrClassOps = {nullptr, /* addProperty */
|
||||
nullptr, /* delProperty */
|
||||
nullptr, /* enumerate */
|
||||
nullptr, /* newEnumerate */
|
||||
nullptr, /* resolve */
|
||||
nullptr, /* mayResolve */
|
||||
TypeDescr::finalize,
|
||||
ScalarTypeDescr::call};
|
||||
static const JSClassOps ScalarTypeDescrClassOps = {nullptr, /* addProperty */
|
||||
nullptr, /* delProperty */
|
||||
nullptr, /* enumerate */
|
||||
nullptr, /* newEnumerate */
|
||||
nullptr, /* resolve */
|
||||
nullptr, /* mayResolve */
|
||||
TypeDescr::finalize,
|
||||
ScalarTypeDescr::call};
|
||||
|
||||
const Class js::ScalarTypeDescr::class_ = {
|
||||
"Scalar",
|
||||
|
@ -358,14 +358,15 @@ TypeDescr* GlobalObject::getOrCreateReferenceTypeDescr(
|
|||
* reference type object this actually is.
|
||||
*/
|
||||
|
||||
static const ClassOps ReferenceTypeDescrClassOps = {nullptr, /* addProperty */
|
||||
nullptr, /* delProperty */
|
||||
nullptr, /* enumerate */
|
||||
nullptr, /* newEnumerate */
|
||||
nullptr, /* resolve */
|
||||
nullptr, /* mayResolve */
|
||||
TypeDescr::finalize,
|
||||
ReferenceTypeDescr::call};
|
||||
static const JSClassOps ReferenceTypeDescrClassOps = {
|
||||
nullptr, /* addProperty */
|
||||
nullptr, /* delProperty */
|
||||
nullptr, /* enumerate */
|
||||
nullptr, /* newEnumerate */
|
||||
nullptr, /* resolve */
|
||||
nullptr, /* mayResolve */
|
||||
TypeDescr::finalize,
|
||||
ReferenceTypeDescr::call};
|
||||
|
||||
const Class js::ReferenceTypeDescr::class_ = {
|
||||
"Reference",
|
||||
|
@ -498,16 +499,16 @@ static TypedProto* CreatePrototypeObjectForComplexTypeInstance(
|
|||
SingletonObject);
|
||||
}
|
||||
|
||||
static const ClassOps ArrayTypeDescrClassOps = {nullptr, /* addProperty */
|
||||
nullptr, /* delProperty */
|
||||
nullptr, /* enumerate */
|
||||
nullptr, /* newEnumerate */
|
||||
nullptr, /* resolve */
|
||||
nullptr, /* mayResolve */
|
||||
TypeDescr::finalize,
|
||||
nullptr, /* call */
|
||||
nullptr, /* hasInstance */
|
||||
TypedObject::construct};
|
||||
static const JSClassOps ArrayTypeDescrClassOps = {nullptr, /* addProperty */
|
||||
nullptr, /* delProperty */
|
||||
nullptr, /* enumerate */
|
||||
nullptr, /* newEnumerate */
|
||||
nullptr, /* resolve */
|
||||
nullptr, /* mayResolve */
|
||||
TypeDescr::finalize,
|
||||
nullptr, /* call */
|
||||
nullptr, /* hasInstance */
|
||||
TypedObject::construct};
|
||||
|
||||
const Class ArrayTypeDescr::class_ = {
|
||||
"ArrayType",
|
||||
|
@ -747,16 +748,16 @@ bool js::IsTypedObjectArray(JSObject& obj) {
|
|||
* StructType class
|
||||
*/
|
||||
|
||||
static const ClassOps StructTypeDescrClassOps = {nullptr, /* addProperty */
|
||||
nullptr, /* delProperty */
|
||||
nullptr, /* enumerate */
|
||||
nullptr, /* newEnumerate */
|
||||
nullptr, /* resolve */
|
||||
nullptr, /* mayResolve */
|
||||
TypeDescr::finalize,
|
||||
StructTypeDescr::call,
|
||||
nullptr, /* hasInstance */
|
||||
TypedObject::construct};
|
||||
static const JSClassOps StructTypeDescrClassOps = {nullptr, /* addProperty */
|
||||
nullptr, /* delProperty */
|
||||
nullptr, /* enumerate */
|
||||
nullptr, /* newEnumerate */
|
||||
nullptr, /* resolve */
|
||||
nullptr, /* mayResolve */
|
||||
TypeDescr::finalize,
|
||||
StructTypeDescr::call,
|
||||
nullptr, /* hasInstance */
|
||||
TypedObject::construct};
|
||||
|
||||
const Class StructTypeDescr::class_ = {
|
||||
"StructType",
|
||||
|
@ -2279,7 +2280,7 @@ const ObjectOps TypedObject::objectOps_ = {
|
|||
};
|
||||
|
||||
#define DEFINE_TYPEDOBJ_CLASS(Name, Trace, Moved) \
|
||||
static const ClassOps Name##ClassOps = { \
|
||||
static const JSClassOps Name##ClassOps = { \
|
||||
nullptr, /* addProperty */ \
|
||||
nullptr, /* delProperty */ \
|
||||
nullptr, /* enumerate */ \
|
||||
|
|
|
@ -255,17 +255,17 @@ bool WeakMapObject::construct(JSContext* cx, unsigned argc, Value* vp) {
|
|||
return true;
|
||||
}
|
||||
|
||||
const ClassOps WeakCollectionObject::classOps_ = {nullptr, /* addProperty */
|
||||
nullptr, /* delProperty */
|
||||
nullptr, /* enumerate */
|
||||
nullptr, /* newEnumerate */
|
||||
nullptr, /* resolve */
|
||||
nullptr, /* mayResolve */
|
||||
WeakCollection_finalize,
|
||||
nullptr, /* call */
|
||||
nullptr, /* hasInstance */
|
||||
nullptr, /* construct */
|
||||
WeakCollection_trace};
|
||||
const JSClassOps WeakCollectionObject::classOps_ = {nullptr, /* addProperty */
|
||||
nullptr, /* delProperty */
|
||||
nullptr, /* enumerate */
|
||||
nullptr, /* newEnumerate */
|
||||
nullptr, /* resolve */
|
||||
nullptr, /* mayResolve */
|
||||
WeakCollection_finalize,
|
||||
nullptr, /* call */
|
||||
nullptr, /* hasInstance */
|
||||
nullptr, /* construct */
|
||||
WeakCollection_trace};
|
||||
|
||||
const ClassSpec WeakMapObject::classSpec_ = {
|
||||
GenericCreateConstructor<WeakMapObject::construct, 0,
|
||||
|
|
|
@ -31,7 +31,7 @@ class WeakCollectionObject : public NativeObject {
|
|||
MutableHandleObject ret);
|
||||
|
||||
protected:
|
||||
static const ClassOps classOps_;
|
||||
static const JSClassOps classOps_;
|
||||
};
|
||||
|
||||
class WeakMapObject : public WeakCollectionObject {
|
||||
|
|
|
@ -39,13 +39,13 @@ using js::intl::ReportInternalError;
|
|||
using js::intl::SharedIntlData;
|
||||
using js::intl::StringsAreEqual;
|
||||
|
||||
const ClassOps CollatorObject::classOps_ = {nullptr, /* addProperty */
|
||||
nullptr, /* delProperty */
|
||||
nullptr, /* enumerate */
|
||||
nullptr, /* newEnumerate */
|
||||
nullptr, /* resolve */
|
||||
nullptr, /* mayResolve */
|
||||
CollatorObject::finalize};
|
||||
const JSClassOps CollatorObject::classOps_ = {nullptr, /* addProperty */
|
||||
nullptr, /* delProperty */
|
||||
nullptr, /* enumerate */
|
||||
nullptr, /* newEnumerate */
|
||||
nullptr, /* resolve */
|
||||
nullptr, /* mayResolve */
|
||||
CollatorObject::finalize};
|
||||
|
||||
const Class CollatorObject::class_ = {
|
||||
js_Object_str,
|
||||
|
|
|
@ -48,7 +48,7 @@ class CollatorObject : public NativeObject {
|
|||
}
|
||||
|
||||
private:
|
||||
static const ClassOps classOps_;
|
||||
static const JSClassOps classOps_;
|
||||
|
||||
static void finalize(JSFreeOp* fop, JSObject* obj);
|
||||
};
|
||||
|
|
|
@ -46,7 +46,7 @@ using js::intl::INITIAL_CHAR_BUFFER_SIZE;
|
|||
using js::intl::SharedIntlData;
|
||||
using js::intl::StringsAreEqual;
|
||||
|
||||
const ClassOps DateTimeFormatObject::classOps_ = {
|
||||
const JSClassOps DateTimeFormatObject::classOps_ = {
|
||||
nullptr, /* addProperty */
|
||||
nullptr, /* delProperty */
|
||||
nullptr, /* enumerate */
|
||||
|
|
|
@ -46,7 +46,7 @@ class DateTimeFormatObject : public NativeObject {
|
|||
}
|
||||
|
||||
private:
|
||||
static const ClassOps classOps_;
|
||||
static const JSClassOps classOps_;
|
||||
|
||||
static void finalize(JSFreeOp* fop, JSObject* obj);
|
||||
};
|
||||
|
|
|
@ -58,13 +58,13 @@ using js::intl::IcuLocale;
|
|||
|
||||
using JS::AutoStableStringChars;
|
||||
|
||||
const ClassOps NumberFormatObject::classOps_ = {nullptr, /* addProperty */
|
||||
nullptr, /* delProperty */
|
||||
nullptr, /* enumerate */
|
||||
nullptr, /* newEnumerate */
|
||||
nullptr, /* resolve */
|
||||
nullptr, /* mayResolve */
|
||||
NumberFormatObject::finalize};
|
||||
const JSClassOps NumberFormatObject::classOps_ = {nullptr, /* addProperty */
|
||||
nullptr, /* delProperty */
|
||||
nullptr, /* enumerate */
|
||||
nullptr, /* newEnumerate */
|
||||
nullptr, /* resolve */
|
||||
nullptr, /* mayResolve */
|
||||
NumberFormatObject::finalize};
|
||||
|
||||
const Class NumberFormatObject::class_ = {
|
||||
js_Object_str,
|
||||
|
|
|
@ -63,7 +63,7 @@ class NumberFormatObject : public NativeObject {
|
|||
}
|
||||
|
||||
private:
|
||||
static const ClassOps classOps_;
|
||||
static const JSClassOps classOps_;
|
||||
|
||||
static void finalize(JSFreeOp* fop, JSObject* obj);
|
||||
};
|
||||
|
|
|
@ -34,13 +34,13 @@ using js::intl::CallICU;
|
|||
using js::intl::GetAvailableLocales;
|
||||
using js::intl::IcuLocale;
|
||||
|
||||
const ClassOps PluralRulesObject::classOps_ = {nullptr, /* addProperty */
|
||||
nullptr, /* delProperty */
|
||||
nullptr, /* enumerate */
|
||||
nullptr, /* newEnumerate */
|
||||
nullptr, /* resolve */
|
||||
nullptr, /* mayResolve */
|
||||
PluralRulesObject::finalize};
|
||||
const JSClassOps PluralRulesObject::classOps_ = {nullptr, /* addProperty */
|
||||
nullptr, /* delProperty */
|
||||
nullptr, /* enumerate */
|
||||
nullptr, /* newEnumerate */
|
||||
nullptr, /* resolve */
|
||||
nullptr, /* mayResolve */
|
||||
PluralRulesObject::finalize};
|
||||
|
||||
const Class PluralRulesObject::class_ = {
|
||||
js_Object_str,
|
||||
|
|
|
@ -71,7 +71,7 @@ class PluralRulesObject : public NativeObject {
|
|||
}
|
||||
|
||||
private:
|
||||
static const ClassOps classOps_;
|
||||
static const JSClassOps classOps_;
|
||||
|
||||
static void finalize(JSFreeOp* fop, JSObject* obj);
|
||||
};
|
||||
|
|
|
@ -32,7 +32,7 @@ using js::intl::IcuLocale;
|
|||
|
||||
/**************** RelativeTimeFormat *****************/
|
||||
|
||||
const ClassOps RelativeTimeFormatObject::classOps_ = {
|
||||
const JSClassOps RelativeTimeFormatObject::classOps_ = {
|
||||
nullptr, /* addProperty */
|
||||
nullptr, /* delProperty */
|
||||
nullptr, /* enumerate */
|
||||
|
|
|
@ -44,7 +44,7 @@ class RelativeTimeFormatObject : public NativeObject {
|
|||
}
|
||||
|
||||
private:
|
||||
static const ClassOps classOps_;
|
||||
static const JSClassOps classOps_;
|
||||
|
||||
static void finalize(JSFreeOp* fop, JSObject* obj);
|
||||
};
|
||||
|
|
|
@ -530,7 +530,7 @@ static void GlobalDebuggerVectorHolder_finalize(JSFreeOp* fop, JSObject* obj) {
|
|||
fop->delete_(obj, debuggers, MemoryUse::GlobalDebuggerVector);
|
||||
}
|
||||
|
||||
static const ClassOps GlobalDebuggerVectorHolder_classOps = {
|
||||
static const JSClassOps GlobalDebuggerVectorHolder_classOps = {
|
||||
nullptr,
|
||||
nullptr,
|
||||
nullptr,
|
||||
|
@ -3854,17 +3854,17 @@ bool DebuggerWeakMap<UnbarrieredKey, Wrapper, InvisibleKeysOk>::
|
|||
return true;
|
||||
}
|
||||
|
||||
const ClassOps Debugger::classOps_ = {nullptr, /* addProperty */
|
||||
nullptr, /* delProperty */
|
||||
nullptr, /* enumerate */
|
||||
nullptr, /* newEnumerate */
|
||||
nullptr, /* resolve */
|
||||
nullptr, /* mayResolve */
|
||||
nullptr, /* finalize */
|
||||
nullptr, /* call */
|
||||
nullptr, /* hasInstance */
|
||||
nullptr, /* construct */
|
||||
Debugger::traceObject};
|
||||
const JSClassOps Debugger::classOps_ = {nullptr, /* addProperty */
|
||||
nullptr, /* delProperty */
|
||||
nullptr, /* enumerate */
|
||||
nullptr, /* newEnumerate */
|
||||
nullptr, /* resolve */
|
||||
nullptr, /* mayResolve */
|
||||
nullptr, /* finalize */
|
||||
nullptr, /* call */
|
||||
nullptr, /* hasInstance */
|
||||
nullptr, /* construct */
|
||||
Debugger::traceObject};
|
||||
|
||||
const Class Debugger::class_ = {
|
||||
"Debugger",
|
||||
|
|
|
@ -834,7 +834,7 @@ class Debugger : private mozilla::LinkedListElement<Debugger> {
|
|||
void traceForMovingGC(JSTracer* trc);
|
||||
void traceCrossCompartmentEdges(JSTracer* tracer);
|
||||
|
||||
static const ClassOps classOps_;
|
||||
static const JSClassOps classOps_;
|
||||
|
||||
public:
|
||||
static const Class class_;
|
||||
|
|
|
@ -51,7 +51,7 @@ using mozilla::Maybe;
|
|||
using mozilla::Nothing;
|
||||
using mozilla::Some;
|
||||
|
||||
const ClassOps DebuggerEnvironment::classOps_ = {
|
||||
const JSClassOps DebuggerEnvironment::classOps_ = {
|
||||
nullptr, /* addProperty */
|
||||
nullptr, /* delProperty */
|
||||
nullptr, /* enumerate */
|
||||
|
|
|
@ -72,7 +72,7 @@ class DebuggerEnvironment : public NativeObject {
|
|||
HandleId id, HandleValue value);
|
||||
|
||||
private:
|
||||
static const ClassOps classOps_;
|
||||
static const JSClassOps classOps_;
|
||||
|
||||
static const JSPropertySpec properties_[];
|
||||
static const JSFunctionSpec methods_[];
|
||||
|
|
|
@ -172,7 +172,7 @@ inline js::Debugger* js::DebuggerFrame::owner() const {
|
|||
return Debugger::fromJSObject(dbgobj);
|
||||
}
|
||||
|
||||
const ClassOps DebuggerFrame::classOps_ = {
|
||||
const JSClassOps DebuggerFrame::classOps_ = {
|
||||
nullptr, /* addProperty */
|
||||
nullptr, /* delProperty */
|
||||
nullptr, /* enumerate */
|
||||
|
|
|
@ -250,7 +250,7 @@ class DebuggerFrame : public NativeObject {
|
|||
bool hasAnyLiveHooks() const;
|
||||
|
||||
private:
|
||||
static const ClassOps classOps_;
|
||||
static const JSClassOps classOps_;
|
||||
|
||||
static const JSPropertySpec properties_[];
|
||||
static const JSFunctionSpec methods_[];
|
||||
|
|
|
@ -71,7 +71,7 @@ using mozilla::Maybe;
|
|||
using mozilla::Nothing;
|
||||
using mozilla::Some;
|
||||
|
||||
const ClassOps DebuggerObject::classOps_ = {
|
||||
const JSClassOps DebuggerObject::classOps_ = {
|
||||
nullptr, /* addProperty */
|
||||
nullptr, /* delProperty */
|
||||
nullptr, /* enumerate */
|
||||
|
|
|
@ -174,7 +174,7 @@ class DebuggerObject : public NativeObject {
|
|||
|
||||
static const unsigned RESERVED_SLOTS = 1;
|
||||
|
||||
static const ClassOps classOps_;
|
||||
static const JSClassOps classOps_;
|
||||
|
||||
static const JSPropertySpec properties_[];
|
||||
static const JSPropertySpec promiseProperties_[];
|
||||
|
|
|
@ -57,7 +57,7 @@ using namespace js;
|
|||
using mozilla::Maybe;
|
||||
using mozilla::Some;
|
||||
|
||||
const ClassOps DebuggerScript::classOps_ = {
|
||||
const JSClassOps DebuggerScript::classOps_ = {
|
||||
nullptr, /* addProperty */
|
||||
nullptr, /* delProperty */
|
||||
nullptr, /* enumerate */
|
||||
|
|
|
@ -104,7 +104,7 @@ class DebuggerScript : public NativeObject {
|
|||
}
|
||||
|
||||
private:
|
||||
static const ClassOps classOps_;
|
||||
static const JSClassOps classOps_;
|
||||
|
||||
static const JSPropertySpec properties_[];
|
||||
static const JSFunctionSpec methods_[];
|
||||
|
|
|
@ -49,7 +49,7 @@ using mozilla::Maybe;
|
|||
using mozilla::Nothing;
|
||||
using mozilla::Some;
|
||||
|
||||
const ClassOps DebuggerSource::classOps_ = {
|
||||
const JSClassOps DebuggerSource::classOps_ = {
|
||||
nullptr, /* addProperty */
|
||||
nullptr, /* delProperty */
|
||||
nullptr, /* enumerate */
|
||||
|
|
|
@ -65,7 +65,7 @@ class DebuggerSource : public NativeObject {
|
|||
static bool getSourceMapURL(JSContext* cx, unsigned argc, Value* vp);
|
||||
|
||||
private:
|
||||
static const ClassOps classOps_;
|
||||
static const JSClassOps classOps_;
|
||||
|
||||
static const JSPropertySpec properties_[];
|
||||
static const JSFunctionSpec methods_[];
|
||||
|
|
|
@ -92,8 +92,8 @@ var ignoreClasses = {
|
|||
var ignoreCallees = {
|
||||
"js::Class.trace" : true,
|
||||
"js::Class.finalize" : true,
|
||||
"js::ClassOps.trace" : true,
|
||||
"js::ClassOps.finalize" : true,
|
||||
"JSClassOps.trace" : true,
|
||||
"JSClassOps.finalize" : true,
|
||||
"JSRuntime.destroyPrincipals" : true,
|
||||
"icu_50::UObject.__deleting_dtor" : true, // destructors in ICU code can't cause GC
|
||||
"mozilla::CycleCollectedJSRuntime.DescribeCustomObjects" : true, // During tracing, cannot GC.
|
||||
|
|
|
@ -12747,8 +12747,8 @@ void CodeGenerator::emitIsCallableOrConstructor(Register object,
|
|||
|
||||
masm.bind(&hasCOps);
|
||||
masm.loadPtr(Address(output, offsetof(js::Class, cOps)), output);
|
||||
size_t opsOffset = mode == Callable ? offsetof(js::ClassOps, call)
|
||||
: offsetof(js::ClassOps, construct);
|
||||
size_t opsOffset = mode == Callable ? offsetof(JSClassOps, call)
|
||||
: offsetof(JSClassOps, construct);
|
||||
masm.cmpPtrSet(Assembler::NonZero, Address(output, opsOffset),
|
||||
ImmPtr(nullptr), output);
|
||||
|
||||
|
|
|
@ -1438,7 +1438,7 @@ void MacroAssembler::typeOfObject(Register obj, Register scratch, Label* slow,
|
|||
ImmPtr(nullptr), isObject);
|
||||
|
||||
loadPtr(Address(scratch, offsetof(js::Class, cOps)), scratch);
|
||||
branchPtr(Assembler::Equal, Address(scratch, offsetof(js::ClassOps, call)),
|
||||
branchPtr(Assembler::Equal, Address(scratch, offsetof(JSClassOps, call)),
|
||||
ImmPtr(nullptr), isObject);
|
||||
|
||||
jump(isCallable);
|
||||
|
|
|
@ -192,7 +192,7 @@ JSObject* newCCW(JS::HandleObject sourceZone, JS::HandleObject destZone) {
|
|||
}
|
||||
|
||||
JSObject* newDelegate() {
|
||||
static const js::ClassOps delegateClassOps = {
|
||||
static const JSClassOps delegateClassOps = {
|
||||
nullptr, /* addProperty */
|
||||
nullptr, /* delProperty */
|
||||
nullptr, /* enumerate */
|
||||
|
|
|
@ -141,7 +141,7 @@ const ClassSpec ErrorObject::classSpecs[JSEXN_ERROR_LIMIT] = {
|
|||
&ErrorObject::classSpecs[JSProto_##name - JSProto_Error] \
|
||||
}
|
||||
|
||||
static const ClassOps ErrorObjectClassOps = {
|
||||
static const JSClassOps ErrorObjectClassOps = {
|
||||
nullptr, /* addProperty */
|
||||
nullptr, /* delProperty */
|
||||
nullptr, /* enumerate */
|
||||
|
|
|
@ -742,7 +742,7 @@ size_t js::proxy_ObjectMoved(JSObject* obj, JSObject* old) {
|
|||
return proxy.handler()->objectMoved(obj, old);
|
||||
}
|
||||
|
||||
const ClassOps js::ProxyClassOps = {
|
||||
const JSClassOps js::ProxyClassOps = {
|
||||
nullptr, /* addProperty */
|
||||
nullptr, /* delProperty */
|
||||
nullptr, /* enumerate */
|
||||
|
|
|
@ -456,7 +456,7 @@ class FileObject : public NativeObject {
|
|||
}
|
||||
};
|
||||
|
||||
static const js::ClassOps FileObjectClassOps = {
|
||||
static const JSClassOps FileObjectClassOps = {
|
||||
nullptr, /* addProperty */
|
||||
nullptr, /* delProperty */
|
||||
nullptr, /* enumerate */
|
||||
|
|
|
@ -6977,7 +6977,7 @@ typedef RefPtr<StreamCacheEntry> StreamCacheEntryPtr;
|
|||
|
||||
class StreamCacheEntryObject : public NativeObject {
|
||||
static const unsigned CACHE_ENTRY_SLOT = 0;
|
||||
static const ClassOps classOps_;
|
||||
static const JSClassOps classOps_;
|
||||
static const JSPropertySpec properties_;
|
||||
|
||||
static void finalize(JSFreeOp*, JSObject* obj) {
|
||||
|
@ -7074,7 +7074,7 @@ class StreamCacheEntryObject : public NativeObject {
|
|||
}
|
||||
};
|
||||
|
||||
const ClassOps StreamCacheEntryObject::classOps_ = {
|
||||
const JSClassOps StreamCacheEntryObject::classOps_ = {
|
||||
nullptr, /* addProperty */
|
||||
nullptr, /* delProperty */
|
||||
nullptr, /* enumerate */
|
||||
|
|
|
@ -984,7 +984,7 @@ size_t ArgumentsObject::objectMoved(JSObject* dst, JSObject* src) {
|
|||
* stack frame with their corresponding property values in the frame's
|
||||
* arguments object.
|
||||
*/
|
||||
const ClassOps MappedArgumentsObject::classOps_ = {
|
||||
const JSClassOps MappedArgumentsObject::classOps_ = {
|
||||
nullptr, /* addProperty */
|
||||
ArgumentsObject::obj_delProperty,
|
||||
MappedArgumentsObject::obj_enumerate,
|
||||
|
@ -1020,7 +1020,7 @@ const Class MappedArgumentsObject::class_ = {
|
|||
* Unmapped arguments is significantly less magical than mapped arguments, so
|
||||
* it is represented by a different class while sharing some functionality.
|
||||
*/
|
||||
const ClassOps UnmappedArgumentsObject::classOps_ = {
|
||||
const JSClassOps UnmappedArgumentsObject::classOps_ = {
|
||||
nullptr, /* addProperty */
|
||||
ArgumentsObject::obj_delProperty,
|
||||
UnmappedArgumentsObject::obj_enumerate,
|
||||
|
|
|
@ -413,7 +413,7 @@ class ArgumentsObject : public NativeObject {
|
|||
};
|
||||
|
||||
class MappedArgumentsObject : public ArgumentsObject {
|
||||
static const ClassOps classOps_;
|
||||
static const JSClassOps classOps_;
|
||||
static const ClassExtension classExt_;
|
||||
static const ObjectOps objectOps_;
|
||||
|
||||
|
@ -445,7 +445,7 @@ class MappedArgumentsObject : public ArgumentsObject {
|
|||
};
|
||||
|
||||
class UnmappedArgumentsObject : public ArgumentsObject {
|
||||
static const ClassOps classOps_;
|
||||
static const JSClassOps classOps_;
|
||||
static const ClassExtension classExt_;
|
||||
|
||||
public:
|
||||
|
|
|
@ -287,7 +287,7 @@ void js::UnmapBufferMemory(void* base, size_t mappedSize) {
|
|||
* ArrayBufferObject (base)
|
||||
*/
|
||||
|
||||
static const ClassOps ArrayBufferObjectClassOps = {
|
||||
static const JSClassOps ArrayBufferObjectClassOps = {
|
||||
nullptr, /* addProperty */
|
||||
nullptr, /* delProperty */
|
||||
nullptr, /* enumerate */
|
||||
|
|
|
@ -358,7 +358,7 @@ const ObjectOps ModuleEnvironmentObject::objectOps_ = {
|
|||
nullptr, /* getElements */
|
||||
nullptr};
|
||||
|
||||
const ClassOps ModuleEnvironmentObject::classOps_ = {
|
||||
const JSClassOps ModuleEnvironmentObject::classOps_ = {
|
||||
nullptr, /* addProperty */
|
||||
nullptr, /* delProperty */
|
||||
nullptr, /* enumerate */
|
||||
|
|
|
@ -399,7 +399,7 @@ class ModuleEnvironmentObject : public EnvironmentObject {
|
|||
static const uint32_t MODULE_SLOT = 1;
|
||||
|
||||
static const ObjectOps objectOps_;
|
||||
static const ClassOps classOps_;
|
||||
static const JSClassOps classOps_;
|
||||
|
||||
public:
|
||||
static const Class class_;
|
||||
|
|
|
@ -46,7 +46,7 @@ void RealmInstrumentation::holderTrace(JSTracer* trc, JSObject* obj) {
|
|||
instrumentation->trace(trc);
|
||||
}
|
||||
|
||||
static const ClassOps InstrumentationHolderClassOps = {
|
||||
static const JSClassOps InstrumentationHolderClassOps = {
|
||||
nullptr, /* addProperty */
|
||||
nullptr, /* delProperty */
|
||||
nullptr, /* enumerate */
|
||||
|
|
|
@ -1085,17 +1085,17 @@ void PropertyIteratorObject::finalize(JSFreeOp* fop, JSObject* obj) {
|
|||
}
|
||||
}
|
||||
|
||||
const ClassOps PropertyIteratorObject::classOps_ = {nullptr, /* addProperty */
|
||||
nullptr, /* delProperty */
|
||||
nullptr, /* enumerate */
|
||||
nullptr, /* newEnumerate */
|
||||
nullptr, /* resolve */
|
||||
nullptr, /* mayResolve */
|
||||
finalize,
|
||||
nullptr, /* call */
|
||||
nullptr, /* hasInstance */
|
||||
nullptr, /* construct */
|
||||
trace};
|
||||
const JSClassOps PropertyIteratorObject::classOps_ = {
|
||||
nullptr, /* addProperty */
|
||||
nullptr, /* delProperty */
|
||||
nullptr, /* enumerate */
|
||||
nullptr, /* newEnumerate */
|
||||
nullptr, /* resolve */
|
||||
nullptr, /* mayResolve */
|
||||
finalize, nullptr, /* call */
|
||||
nullptr, /* hasInstance */
|
||||
nullptr, /* construct */
|
||||
trace};
|
||||
|
||||
const Class PropertyIteratorObject::class_ = {
|
||||
"Iterator", JSCLASS_HAS_PRIVATE | JSCLASS_BACKGROUND_FINALIZE,
|
||||
|
|
|
@ -349,7 +349,7 @@ struct NativeIterator {
|
|||
};
|
||||
|
||||
class PropertyIteratorObject : public NativeObject {
|
||||
static const ClassOps classOps_;
|
||||
static const JSClassOps classOps_;
|
||||
|
||||
public:
|
||||
static const Class class_;
|
||||
|
|
|
@ -1194,7 +1194,7 @@ static const JSFunctionSpec function_methods[] = {
|
|||
JSPROP_READONLY | JSPROP_PERMANENT),
|
||||
JS_FS_END};
|
||||
|
||||
static const ClassOps JSFunctionClassOps = {
|
||||
static const JSClassOps JSFunctionClassOps = {
|
||||
nullptr, /* addProperty */
|
||||
nullptr, /* delProperty */
|
||||
fun_enumerate, nullptr, /* newEnumerate */
|
||||
|
|
|
@ -1122,9 +1122,9 @@ inline bool IsObjectValueInCompartment(const Value& v, JS::Compartment* comp) {
|
|||
* A generic trace hook that calls the object's 'trace' method.
|
||||
*
|
||||
* If you are introducing a new JSObject subclass, MyObject, that needs a custom
|
||||
* js::ClassOps::trace function, it's often helpful to write `trace` as a
|
||||
* JSClassOps::trace function, it's often helpful to write `trace` as a
|
||||
* non-static member function, since `this` will the correct type. In this case,
|
||||
* you can use `CallTraceMethod<MyObject>` as your js::ClassOps::trace value.
|
||||
* you can use `CallTraceMethod<MyObject>` as your JSClassOps::trace value.
|
||||
*/
|
||||
template <typename ObjectSubclass>
|
||||
void CallTraceMethod(JSTracer* trc, JSObject* obj) {
|
||||
|
|
|
@ -1669,7 +1669,7 @@ void ScriptSourceObject::trace(JSTracer* trc, JSObject* obj) {
|
|||
}
|
||||
}
|
||||
|
||||
static const ClassOps ScriptSourceObjectClassOps = {
|
||||
static const JSClassOps ScriptSourceObjectClassOps = {
|
||||
nullptr, /* addProperty */
|
||||
nullptr, /* delProperty */
|
||||
nullptr, /* enumerate */
|
||||
|
|
|
@ -1265,7 +1265,7 @@ class ScriptSourceHolder {
|
|||
// canonical SSO will be stored in the wrapper map if necessary so GC will do
|
||||
// the right thing.
|
||||
class ScriptSourceObject : public NativeObject {
|
||||
static const ClassOps classOps_;
|
||||
static const JSClassOps classOps_;
|
||||
|
||||
static ScriptSourceObject* createInternal(JSContext* cx, ScriptSource* source,
|
||||
HandleObject canonical);
|
||||
|
|
|
@ -323,17 +323,17 @@ static void ForOfPIC_traceObject(JSTracer* trc, JSObject* obj) {
|
|||
}
|
||||
}
|
||||
|
||||
static const ClassOps ForOfPICClassOps = {nullptr,
|
||||
nullptr,
|
||||
nullptr,
|
||||
nullptr,
|
||||
nullptr,
|
||||
nullptr,
|
||||
ForOfPIC_finalize,
|
||||
nullptr, /* call */
|
||||
nullptr, /* hasInstance */
|
||||
nullptr, /* construct */
|
||||
ForOfPIC_traceObject};
|
||||
static const JSClassOps ForOfPICClassOps = {nullptr,
|
||||
nullptr,
|
||||
nullptr,
|
||||
nullptr,
|
||||
nullptr,
|
||||
nullptr,
|
||||
ForOfPIC_finalize,
|
||||
nullptr, /* call */
|
||||
nullptr, /* hasInstance */
|
||||
nullptr, /* construct */
|
||||
ForOfPIC_traceObject};
|
||||
|
||||
const Class ForOfPIC::class_ = {
|
||||
"ForOfPIC", JSCLASS_HAS_PRIVATE | JSCLASS_BACKGROUND_FINALIZE,
|
||||
|
|
|
@ -166,7 +166,7 @@ void RegExpObject::trace(JSTracer* trc) {
|
|||
TraceNullableEdge(trc, &sharedRef(), "RegExpObject shared");
|
||||
}
|
||||
|
||||
static const ClassOps RegExpObjectClassOps = {
|
||||
static const JSClassOps RegExpObjectClassOps = {
|
||||
nullptr, /* addProperty */
|
||||
nullptr, /* delProperty */
|
||||
nullptr, /* enumerate */
|
||||
|
|
|
@ -34,17 +34,17 @@ static void resc_trace(JSTracer* trc, JSObject* obj) {
|
|||
}
|
||||
}
|
||||
|
||||
static const ClassOps RegExpStaticsObjectClassOps = {nullptr, /* addProperty */
|
||||
nullptr, /* delProperty */
|
||||
nullptr, /* enumreate */
|
||||
nullptr, /* newEnumerate */
|
||||
nullptr, /* resolve */
|
||||
nullptr, /* mayResolve */
|
||||
resc_finalize,
|
||||
nullptr, /* call */
|
||||
nullptr, /* hasInstance */
|
||||
nullptr, /* construct */
|
||||
resc_trace};
|
||||
static const JSClassOps RegExpStaticsObjectClassOps = {
|
||||
nullptr, /* addProperty */
|
||||
nullptr, /* delProperty */
|
||||
nullptr, /* enumreate */
|
||||
nullptr, /* newEnumerate */
|
||||
nullptr, /* resolve */
|
||||
nullptr, /* mayResolve */
|
||||
resc_finalize, nullptr, /* call */
|
||||
nullptr, /* hasInstance */
|
||||
nullptr, /* construct */
|
||||
resc_trace};
|
||||
|
||||
const Class RegExpStaticsObject::class_ = {
|
||||
"RegExpStatics", JSCLASS_HAS_PRIVATE | JSCLASS_FOREGROUND_FINALIZE,
|
||||
|
|
|
@ -347,7 +347,7 @@ bool SavedFrame::finishSavedFrameInit(JSContext* cx, HandleObject ctor,
|
|||
return FreezeObject(cx, proto);
|
||||
}
|
||||
|
||||
static const ClassOps SavedFrameClassOps = {
|
||||
static const JSClassOps SavedFrameClassOps = {
|
||||
nullptr, // addProperty
|
||||
nullptr, // delProperty
|
||||
nullptr, // enumerate
|
||||
|
|
|
@ -2639,17 +2639,17 @@ GlobalObject* JSRuntime::createSelfHostingGlobal(JSContext* cx) {
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
static const ClassOps shgClassOps = {nullptr,
|
||||
nullptr,
|
||||
nullptr,
|
||||
nullptr,
|
||||
nullptr,
|
||||
nullptr,
|
||||
nullptr,
|
||||
nullptr,
|
||||
nullptr,
|
||||
nullptr,
|
||||
JS_GlobalObjectTraceHook};
|
||||
static const JSClassOps shgClassOps = {nullptr,
|
||||
nullptr,
|
||||
nullptr,
|
||||
nullptr,
|
||||
nullptr,
|
||||
nullptr,
|
||||
nullptr,
|
||||
nullptr,
|
||||
nullptr,
|
||||
nullptr,
|
||||
JS_GlobalObjectTraceHook};
|
||||
|
||||
static const Class shgClass = {"self-hosting-global", JSCLASS_GLOBAL_FLAGS,
|
||||
&shgClassOps};
|
||||
|
|
|
@ -343,7 +343,7 @@ SharedArrayBufferObject* SharedArrayBufferObject::createFromNewRawBuffer(
|
|||
return obj;
|
||||
}
|
||||
|
||||
static const ClassOps SharedArrayBufferObjectClassOps = {
|
||||
static const JSClassOps SharedArrayBufferObjectClassOps = {
|
||||
nullptr, /* addProperty */
|
||||
nullptr, /* delProperty */
|
||||
nullptr, /* enumerate */
|
||||
|
|
|
@ -2130,7 +2130,7 @@ bool TypedArrayObject::getElements(JSContext* cx,
|
|||
* TypedArrayObject boilerplate
|
||||
*/
|
||||
|
||||
static const ClassOps TypedArrayClassOps = {
|
||||
static const JSClassOps TypedArrayClassOps = {
|
||||
nullptr, /* addProperty */
|
||||
nullptr, /* delProperty */
|
||||
nullptr, /* enumerate */
|
||||
|
|
|
@ -657,13 +657,13 @@ static bool GetLimits(JSContext* cx, HandleObject obj, uint32_t maxInitial,
|
|||
// ============================================================================
|
||||
// WebAssembly.Module class and methods
|
||||
|
||||
const ClassOps WasmModuleObject::classOps_ = {nullptr, /* addProperty */
|
||||
nullptr, /* delProperty */
|
||||
nullptr, /* enumerate */
|
||||
nullptr, /* newEnumerate */
|
||||
nullptr, /* resolve */
|
||||
nullptr, /* mayResolve */
|
||||
WasmModuleObject::finalize};
|
||||
const JSClassOps WasmModuleObject::classOps_ = {nullptr, /* addProperty */
|
||||
nullptr, /* delProperty */
|
||||
nullptr, /* enumerate */
|
||||
nullptr, /* newEnumerate */
|
||||
nullptr, /* resolve */
|
||||
nullptr, /* mayResolve */
|
||||
WasmModuleObject::finalize};
|
||||
|
||||
const Class WasmModuleObject::class_ = {
|
||||
"WebAssembly.Module",
|
||||
|
@ -1176,17 +1176,17 @@ const Module& WasmModuleObject::module() const {
|
|||
// ============================================================================
|
||||
// WebAssembly.Instance class and methods
|
||||
|
||||
const ClassOps WasmInstanceObject::classOps_ = {nullptr, /* addProperty */
|
||||
nullptr, /* delProperty */
|
||||
nullptr, /* enumerate */
|
||||
nullptr, /* newEnumerate */
|
||||
nullptr, /* resolve */
|
||||
nullptr, /* mayResolve */
|
||||
WasmInstanceObject::finalize,
|
||||
nullptr, /* call */
|
||||
nullptr, /* hasInstance */
|
||||
nullptr, /* construct */
|
||||
WasmInstanceObject::trace};
|
||||
const JSClassOps WasmInstanceObject::classOps_ = {nullptr, /* addProperty */
|
||||
nullptr, /* delProperty */
|
||||
nullptr, /* enumerate */
|
||||
nullptr, /* newEnumerate */
|
||||
nullptr, /* resolve */
|
||||
nullptr, /* mayResolve */
|
||||
WasmInstanceObject::finalize,
|
||||
nullptr, /* call */
|
||||
nullptr, /* hasInstance */
|
||||
nullptr, /* construct */
|
||||
WasmInstanceObject::trace};
|
||||
|
||||
const Class WasmInstanceObject::class_ = {
|
||||
"WebAssembly.Instance",
|
||||
|
@ -1603,13 +1603,13 @@ uint32_t wasm::ExportedFunctionToFuncIndex(JSFunction* fun) {
|
|||
// ============================================================================
|
||||
// WebAssembly.Memory class and methods
|
||||
|
||||
const ClassOps WasmMemoryObject::classOps_ = {nullptr, /* addProperty */
|
||||
nullptr, /* delProperty */
|
||||
nullptr, /* enumerate */
|
||||
nullptr, /* newEnumerate */
|
||||
nullptr, /* resolve */
|
||||
nullptr, /* mayResolve */
|
||||
WasmMemoryObject::finalize};
|
||||
const JSClassOps WasmMemoryObject::classOps_ = {nullptr, /* addProperty */
|
||||
nullptr, /* delProperty */
|
||||
nullptr, /* enumerate */
|
||||
nullptr, /* newEnumerate */
|
||||
nullptr, /* resolve */
|
||||
nullptr, /* mayResolve */
|
||||
WasmMemoryObject::finalize};
|
||||
|
||||
const Class WasmMemoryObject::class_ = {
|
||||
"WebAssembly.Memory",
|
||||
|
@ -1943,17 +1943,17 @@ bool js::wasm::IsSharedWasmMemoryObject(JSObject* obj) {
|
|||
// ============================================================================
|
||||
// WebAssembly.Table class and methods
|
||||
|
||||
const ClassOps WasmTableObject::classOps_ = {nullptr, /* addProperty */
|
||||
nullptr, /* delProperty */
|
||||
nullptr, /* enumerate */
|
||||
nullptr, /* newEnumerate */
|
||||
nullptr, /* resolve */
|
||||
nullptr, /* mayResolve */
|
||||
WasmTableObject::finalize,
|
||||
nullptr, /* call */
|
||||
nullptr, /* hasInstance */
|
||||
nullptr, /* construct */
|
||||
WasmTableObject::trace};
|
||||
const JSClassOps WasmTableObject::classOps_ = {nullptr, /* addProperty */
|
||||
nullptr, /* delProperty */
|
||||
nullptr, /* enumerate */
|
||||
nullptr, /* newEnumerate */
|
||||
nullptr, /* resolve */
|
||||
nullptr, /* mayResolve */
|
||||
WasmTableObject::finalize,
|
||||
nullptr, /* call */
|
||||
nullptr, /* hasInstance */
|
||||
nullptr, /* construct */
|
||||
WasmTableObject::trace};
|
||||
|
||||
const Class WasmTableObject::class_ = {
|
||||
"WebAssembly.Table",
|
||||
|
@ -2318,17 +2318,17 @@ Table& WasmTableObject::table() const {
|
|||
// ============================================================================
|
||||
// WebAssembly.global class and methods
|
||||
|
||||
const ClassOps WasmGlobalObject::classOps_ = {nullptr, /* addProperty */
|
||||
nullptr, /* delProperty */
|
||||
nullptr, /* enumerate */
|
||||
nullptr, /* newEnumerate */
|
||||
nullptr, /* resolve */
|
||||
nullptr, /* mayResolve */
|
||||
WasmGlobalObject::finalize,
|
||||
nullptr, /* call */
|
||||
nullptr, /* hasInstance */
|
||||
nullptr, /* construct */
|
||||
WasmGlobalObject::trace};
|
||||
const JSClassOps WasmGlobalObject::classOps_ = {nullptr, /* addProperty */
|
||||
nullptr, /* delProperty */
|
||||
nullptr, /* enumerate */
|
||||
nullptr, /* newEnumerate */
|
||||
nullptr, /* resolve */
|
||||
nullptr, /* mayResolve */
|
||||
WasmGlobalObject::finalize,
|
||||
nullptr, /* call */
|
||||
nullptr, /* hasInstance */
|
||||
nullptr, /* construct */
|
||||
WasmGlobalObject::trace};
|
||||
|
||||
const Class WasmGlobalObject::class_ = {
|
||||
"WebAssembly.Global",
|
||||
|
@ -3422,7 +3422,7 @@ class ResolveResponseClosure : public NativeObject {
|
|||
static const unsigned PROMISE_OBJ_SLOT = 1;
|
||||
static const unsigned INSTANTIATE_SLOT = 2;
|
||||
static const unsigned IMPORT_OBJ_SLOT = 3;
|
||||
static const ClassOps classOps_;
|
||||
static const JSClassOps classOps_;
|
||||
|
||||
static void finalize(JSFreeOp* fop, JSObject* obj) {
|
||||
auto& closure = obj->as<ResolveResponseClosure>();
|
||||
|
@ -3468,7 +3468,7 @@ class ResolveResponseClosure : public NativeObject {
|
|||
}
|
||||
};
|
||||
|
||||
const ClassOps ResolveResponseClosure::classOps_ = {
|
||||
const JSClassOps ResolveResponseClosure::classOps_ = {
|
||||
nullptr, /* addProperty */
|
||||
nullptr, /* delProperty */
|
||||
nullptr, /* enumerate */
|
||||
|
|
|
@ -126,7 +126,7 @@ JSObject* InitWebAssemblyClass(JSContext* cx, Handle<GlobalObject*> global);
|
|||
|
||||
class WasmModuleObject : public NativeObject {
|
||||
static const unsigned MODULE_SLOT = 0;
|
||||
static const ClassOps classOps_;
|
||||
static const JSClassOps classOps_;
|
||||
static void finalize(JSFreeOp* fop, JSObject* obj);
|
||||
static bool imports(JSContext* cx, unsigned argc, Value* vp);
|
||||
static bool exports(JSContext* cx, unsigned argc, Value* vp);
|
||||
|
@ -161,7 +161,7 @@ class WasmGlobalObject : public NativeObject {
|
|||
static const unsigned MUTABLE_SLOT = 1;
|
||||
static const unsigned CELL_SLOT = 2;
|
||||
|
||||
static const ClassOps classOps_;
|
||||
static const JSClassOps classOps_;
|
||||
static void finalize(JSFreeOp*, JSObject* obj);
|
||||
static void trace(JSTracer* trc, JSObject* obj);
|
||||
|
||||
|
@ -214,7 +214,7 @@ class WasmInstanceObject : public NativeObject {
|
|||
static const unsigned INSTANCE_SCOPE_SLOT = 4;
|
||||
static const unsigned GLOBALS_SLOT = 5;
|
||||
|
||||
static const ClassOps classOps_;
|
||||
static const JSClassOps classOps_;
|
||||
static bool exportsGetterImpl(JSContext* cx, const CallArgs& args);
|
||||
static bool exportsGetter(JSContext* cx, unsigned argc, Value* vp);
|
||||
bool isNewborn() const;
|
||||
|
@ -286,7 +286,7 @@ class WasmInstanceObject : public NativeObject {
|
|||
class WasmMemoryObject : public NativeObject {
|
||||
static const unsigned BUFFER_SLOT = 0;
|
||||
static const unsigned OBSERVERS_SLOT = 1;
|
||||
static const ClassOps classOps_;
|
||||
static const JSClassOps classOps_;
|
||||
static void finalize(JSFreeOp* fop, JSObject* obj);
|
||||
static bool bufferGetterImpl(JSContext* cx, const CallArgs& args);
|
||||
static bool bufferGetter(JSContext* cx, unsigned argc, Value* vp);
|
||||
|
@ -345,7 +345,7 @@ class WasmMemoryObject : public NativeObject {
|
|||
|
||||
class WasmTableObject : public NativeObject {
|
||||
static const unsigned TABLE_SLOT = 0;
|
||||
static const ClassOps classOps_;
|
||||
static const JSClassOps classOps_;
|
||||
bool isNewborn() const;
|
||||
static void finalize(JSFreeOp* fop, JSObject* obj);
|
||||
static void trace(JSTracer* trc, JSObject* obj);
|
||||
|
|
Загрузка…
Ссылка в новой задаче