summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2020-11-09 21:12:46 -0500
committerMatt A. Tobin <email@mattatobin.com>2020-11-09 21:12:46 -0500
commite8a6ee355f8bc318946c55ca34558464afe38bd0 (patch)
tree04f4719a3558792ac6cb9f72d3c64a02a6abfb5a
parent4694c609642b6c193d8e16cf1203694d9a3b008c (diff)
downloaduxp-e8a6ee355f8bc318946c55ca34558464afe38bd0.tar.gz
Bug 1466909 - Use AddLvalueReference for UniquePtr's operator*().
This is required for UniquePtr to accept <void>, which is required for PseudoHandle = mozilla::UniquePtr<T, JS::FreePolicy>; in turn for mozilla::SegmentedVector<PseudoHandle<void>> uniquePtrArena_; Tag #1679
-rw-r--r--mfbt/UniquePtr.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/mfbt/UniquePtr.h b/mfbt/UniquePtr.h
index 5679d4e03f..97fb8d27ae 100644
--- a/mfbt/UniquePtr.h
+++ b/mfbt/UniquePtr.h
@@ -313,7 +313,7 @@ public:
return *this;
}
- T& operator*() const { return *get(); }
+ typename AddLvalueReference<T>::Type operator*() const { return *get(); }
Pointer operator->() const
{
MOZ_ASSERT(get(), "dereferencing a UniquePtr containing nullptr");