--HG--
extra : rebase_source : 41cf1eaa104bf386c77777be906236d1d15a2622
This commit is contained in:
Terrence Cole 2014-06-23 12:36:36 -07:00
Родитель edbfc0d3f6
Коммит 06bb27de7f
1 изменённых файлов: 18 добавлений и 0 удалений

Просмотреть файл

@ -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)