summaryrefslogtreecommitdiff
path: root/dom/bindings/RootedOwningNonNull.h
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2022-05-29 00:47:25 -0500
committerMatt A. Tobin <email@mattatobin.com>2022-05-29 00:47:25 -0500
commitf11b40c3ab4a5a766b0b71ab1e9a6199b23bbfeb (patch)
tree7b10fdf57c04235448662d0256ef76fa48a1d076 /dom/bindings/RootedOwningNonNull.h
parent5310bcfbad6c8687d0bdbe5e49fb73858dcc1631 (diff)
downloadaura-central-f11b40c3ab4a5a766b0b71ab1e9a6199b23bbfeb.tar.gz
[JS:Engine] Remove the use of tagged shape pointers
Diffstat (limited to 'dom/bindings/RootedOwningNonNull.h')
-rw-r--r--dom/bindings/RootedOwningNonNull.h15
1 files changed, 3 insertions, 12 deletions
diff --git a/dom/bindings/RootedOwningNonNull.h b/dom/bindings/RootedOwningNonNull.h
index 13424d155..387a70734 100644
--- a/dom/bindings/RootedOwningNonNull.h
+++ b/dom/bindings/RootedOwningNonNull.h
@@ -50,21 +50,12 @@ struct GCPolicy<mozilla::OwningNonNull<T>>
} // namespace JS
namespace js {
-template<typename T>
-struct RootedBase<mozilla::OwningNonNull<T>>
+template<typename T, typename Wrapper>
+struct WrappedPtrOperations<mozilla::OwningNonNull<T>, Wrapper>
{
- typedef mozilla::OwningNonNull<T> SmartPtrType;
-
- operator SmartPtrType& () const
- {
- auto& self = *static_cast<const JS::Rooted<SmartPtrType>*>(this);
- return self.get();
- }
-
operator T& () const
{
- auto& self = *static_cast<const JS::Rooted<SmartPtrType>*>(this);
- return self.get();
+ return static_cast<const Wrapper*>(this)->get();
}
};
} // namespace js