mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-06 00:31:27 +00:00
Bug 1028358; r=jonco
--HG-- extra : rebase_source : 41cf1eaa104bf386c77777be906236d1d15a2622
This commit is contained in:
parent
edbfc0d3f6
commit
06bb27de7f
@ -681,6 +681,24 @@ struct GCMethods<JSObject *>
|
||||
#endif
|
||||
};
|
||||
|
||||
template <>
|
||||
struct GCMethods<JSFunction *>
|
||||
{
|
||||
static JSFunction *initial() { return nullptr; }
|
||||
static bool poisoned(JSFunction *v) { return JS::IsPoisonedPtr(v); }
|
||||
static bool needsPostBarrier(JSFunction *v) {
|
||||
return v != nullptr && gc::IsInsideNursery(reinterpret_cast<gc::Cell *>(v));
|
||||
}
|
||||
#ifdef JSGC_GENERATIONAL
|
||||
static void postBarrier(JSFunction **vp) {
|
||||
JS::HeapCellPostBarrier(reinterpret_cast<js::gc::Cell **>(vp));
|
||||
}
|
||||
static void relocate(JSFunction **vp) {
|
||||
JS::HeapCellRelocate(reinterpret_cast<js::gc::Cell **>(vp));
|
||||
}
|
||||
#endif
|
||||
};
|
||||
|
||||
#ifdef JS_DEBUG
|
||||
/* This helper allows us to assert that Rooted<T> is scoped within a request. */
|
||||
extern JS_PUBLIC_API(bool)
|
||||
|
Loading…
x
Reference in New Issue
Block a user