mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 768626 - Add rooting analysis for PropertyId; r=Waldo
--HG-- extra : rebase_source : 42ba66650effc95e7c764026e2e9c32a16b21838
This commit is contained in:
parent
c69ecca54b
commit
8784cfa2dc
@ -879,6 +879,8 @@ MarkExactStackRoots(JSTracer *trc)
|
||||
MarkStringRoot(trc, (JSString **)addr, "exact stackroot string");
|
||||
} else if (i == THING_ROOT_ID) {
|
||||
MarkIdRoot(trc, (jsid *)addr, "exact stackroot id");
|
||||
} else if (i == THING_ROOT_PROPERTY_ID) {
|
||||
MarkIdRoot(trc, ((PropertyId *)addr)->asId(), "exact stackroot property id");
|
||||
} else if (i == THING_ROOT_VALUE) {
|
||||
MarkValueRoot(trc, (Value *)addr, "exact stackroot value");
|
||||
} else if (i == THING_ROOT_SHAPE) {
|
||||
|
@ -230,6 +230,7 @@ enum ThingRootKind
|
||||
THING_ROOT_SCRIPT,
|
||||
THING_ROOT_XML,
|
||||
THING_ROOT_ID,
|
||||
THING_ROOT_PROPERTY_ID,
|
||||
THING_ROOT_VALUE,
|
||||
THING_ROOT_LIMIT
|
||||
};
|
||||
|
@ -1266,6 +1266,7 @@ class ObjectImpl : public gc::Cell
|
||||
}
|
||||
|
||||
/* GC support. */
|
||||
static inline ThingRootKind rootKind() { return THING_ROOT_OBJECT; }
|
||||
static inline void readBarrier(ObjectImpl *obj);
|
||||
static inline void writeBarrierPre(ObjectImpl *obj);
|
||||
static inline void writeBarrierPost(ObjectImpl *obj, void *addr);
|
||||
@ -1359,4 +1360,13 @@ HasElement(JSContext *cx, Handle<ObjectImpl*> obj, uint32_t index, unsigned reso
|
||||
|
||||
} /* namespace js */
|
||||
|
||||
namespace JS {
|
||||
template <> struct RootMethods<js::PropertyId>
|
||||
{
|
||||
static js::PropertyId initial() { return js::PropertyId(); }
|
||||
static ThingRootKind kind() { return THING_ROOT_PROPERTY_ID; }
|
||||
static bool poisoned(js::PropertyId propid) { return IsPoisonedId(propid.asId()); }
|
||||
};
|
||||
}
|
||||
|
||||
#endif /* ObjectImpl_h__ */
|
||||
|
Loading…
Reference in New Issue
Block a user