#ifndef builtin_WeakMapObject_h
#define builtin_WeakMapObject_h
#include "gc/WeakMap.h"
#include "vm/NativeObject.h"
namespace js {
class GlobalObject;
class WeakCollectionObject : public NativeObject {
public:
ObjectValueMap* getMap() {
return static_cast<ObjectValueMap*>(getPrivate());
}
static MOZ_MUST_USE bool nondeterministicGetKeys(
JSContext* cx, Handle<WeakCollectionObject*> obj,
MutableHandleObject ret);
protected:
static const ClassOps classOps_;
};
class WeakMapObject : public WeakCollectionObject {
public:
static const Class class_;
static const Class protoClass_;
private:
static const ClassSpec classSpec_;
static const JSPropertySpec properties[];
static const JSFunctionSpec methods[];
static MOZ_MUST_USE bool construct(JSContext* cx, unsigned argc, Value* vp);
static MOZ_MUST_USE MOZ_ALWAYS_INLINE bool is(HandleValue v);
static MOZ_MUST_USE MOZ_ALWAYS_INLINE bool has_impl(JSContext* cx,
const CallArgs& args);
static MOZ_MUST_USE bool has(JSContext* cx, unsigned argc, Value* vp);
static MOZ_MUST_USE MOZ_ALWAYS_INLINE bool get_impl(JSContext* cx,
const CallArgs& args);
static MOZ_MUST_USE bool get(JSContext* cx, unsigned argc, Value* vp);
static MOZ_MUST_USE MOZ_ALWAYS_INLINE bool delete_impl(JSContext* cx,
const CallArgs& args);
static MOZ_MUST_USE bool delete_(JSContext* cx, unsigned argc, Value* vp);
static MOZ_MUST_USE MOZ_ALWAYS_INLINE bool set_impl(JSContext* cx,
const CallArgs& args);
static MOZ_MUST_USE bool set(JSContext* cx, unsigned argc, Value* vp);
};
}
#endif