diff options
Diffstat (limited to 'js/src/jsapi-tests/testGCExactRooting.cpp')
-rw-r--r-- | js/src/jsapi-tests/testGCExactRooting.cpp | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/js/src/jsapi-tests/testGCExactRooting.cpp b/js/src/jsapi-tests/testGCExactRooting.cpp index aff65014a9..6d41d374b5 100644 --- a/js/src/jsapi-tests/testGCExactRooting.cpp +++ b/js/src/jsapi-tests/testGCExactRooting.cpp @@ -56,19 +56,10 @@ struct MyContainer }; namespace js { -template <> -struct RootedBase<MyContainer> { - HeapPtr<JSObject*>& obj() { return static_cast<Rooted<MyContainer>*>(this)->get().obj; } - HeapPtr<JSString*>& str() { return static_cast<Rooted<MyContainer>*>(this)->get().str; } -}; -template <> -struct PersistentRootedBase<MyContainer> { - HeapPtr<JSObject*>& obj() { - return static_cast<PersistentRooted<MyContainer>*>(this)->get().obj; - } - HeapPtr<JSString*>& str() { - return static_cast<PersistentRooted<MyContainer>*>(this)->get().str; - } +template <typename Wrapper> +struct MutableWrappedPtrOperations<MyContainer, Wrapper> { + HeapPtr<JSObject*>& obj() { return static_cast<Wrapper*>(this)->get().obj; } + HeapPtr<JSString*>& str() { return static_cast<Wrapper*>(this)->get().str; } }; } // namespace js |