Issue #1742 - Part 1: Refactor rooting base class templates

Based on Bug 1325406
This commit is contained in:
Moonchild 2022-05-24 06:51:11 +00:00 committed by roytam1
commit 80d7d43961
24 changed files with 239 additions and 512 deletions

View file

@ -1613,11 +1613,7 @@ GetSuperEnvFunction(JSContext* cx, InterpreterRegs& regs)
*/
template<typename T>
class ReservedRootedBase {
};
template<typename T>
class ReservedRooted : public ReservedRootedBase<T>
class ReservedRooted : public RootedBase<T, ReservedRooted<T>>
{
Rooted<T>* savedRoot;
@ -1645,14 +1641,6 @@ class ReservedRooted : public ReservedRootedBase<T>
DECLARE_POINTER_ASSIGN_OPS(ReservedRooted, T)
};
template <>
class ReservedRootedBase<Value> : public ValueOperations<ReservedRooted<Value>>
{};
template <>
class ReservedRootedBase<Scope*> : public ScopeCastOperation<ReservedRooted<Scope*>>
{};
static MOZ_NEVER_INLINE bool
Interpret(JSContext* cx, RunState& state)
{