mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 888618 - Part 1: Add Cell::tenuredIsInsideZone for threadsafe asserts. (r=billm)
This commit is contained in:
parent
c10fec5a62
commit
8627080ecc
@ -99,6 +99,7 @@ struct Cell
|
||||
|
||||
inline JSRuntime *runtime() const;
|
||||
inline Zone *tenuredZone() const;
|
||||
inline bool tenuredIsInsideZone(Zone *zone) const;
|
||||
|
||||
#ifdef DEBUG
|
||||
inline bool isAligned() const;
|
||||
@ -994,6 +995,13 @@ Cell::tenuredZone() const
|
||||
return arenaHeader()->zone;
|
||||
}
|
||||
|
||||
bool
|
||||
Cell::tenuredIsInsideZone(Zone *zone) const
|
||||
{
|
||||
JS_ASSERT(isTenured());
|
||||
return zone == arenaHeader()->zone;
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
bool
|
||||
Cell::isAligned() const
|
||||
|
@ -410,7 +410,7 @@ class JSString : public js::gc::Cell
|
||||
}
|
||||
|
||||
JS::Zone *zone() const { return tenuredZone(); }
|
||||
bool isInsideZone(JS::Zone *zone_) { return zone_ == zone(); }
|
||||
bool isInsideZone(JS::Zone *zone_) { return tenuredIsInsideZone(zone_); }
|
||||
js::gc::AllocKind getAllocKind() const { return tenuredGetAllocKind(); }
|
||||
|
||||
static inline void writeBarrierPre(JSString *str);
|
||||
|
Loading…
Reference in New Issue
Block a user