зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1028358; r=jonco
--HG-- extra : rebase_source : 41cf1eaa104bf386c77777be906236d1d15a2622
This commit is contained in:
Родитель
edbfc0d3f6
Коммит
06bb27de7f
|
@ -681,6 +681,24 @@ struct GCMethods<JSObject *>
|
||||||
#endif
|
#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
|
#ifdef JS_DEBUG
|
||||||
/* This helper allows us to assert that Rooted<T> is scoped within a request. */
|
/* This helper allows us to assert that Rooted<T> is scoped within a request. */
|
||||||
extern JS_PUBLIC_API(bool)
|
extern JS_PUBLIC_API(bool)
|
||||||
|
|
Загрузка…
Ссылка в новой задаче