mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-04 23:08:39 +09:00
Issue #1742 - Part 1: Refactor rooting base class templates
Based on Bug 1325406
This commit is contained in:
parent
2f81312755
commit
80d7d43961
24 changed files with 239 additions and 512 deletions
|
|
@ -541,7 +541,6 @@ class InnerViewTable
|
|||
typedef Vector<ArrayBufferViewObject*, 1, SystemAllocPolicy> ViewVector;
|
||||
|
||||
friend class ArrayBufferObject;
|
||||
friend class WeakCacheBase<InnerViewTable>;
|
||||
|
||||
private:
|
||||
struct MapGCPolicy {
|
||||
|
|
@ -602,23 +601,15 @@ class InnerViewTable
|
|||
size_t sizeOfExcludingThis(mozilla::MallocSizeOf mallocSizeOf);
|
||||
};
|
||||
|
||||
template <>
|
||||
class WeakCacheBase<InnerViewTable>
|
||||
template <typename Wrapper>
|
||||
class MutableWrappedPtrOperations<InnerViewTable, Wrapper>
|
||||
: public WrappedPtrOperations<InnerViewTable, Wrapper>
|
||||
{
|
||||
InnerViewTable& table() {
|
||||
return static_cast<JS::WeakCache<InnerViewTable>*>(this)->get();
|
||||
}
|
||||
const InnerViewTable& table() const {
|
||||
return static_cast<const JS::WeakCache<InnerViewTable>*>(this)->get();
|
||||
return static_cast<Wrapper*>(this)->get();
|
||||
}
|
||||
|
||||
public:
|
||||
InnerViewTable::ViewVector* maybeViewsUnbarriered(ArrayBufferObject* obj) {
|
||||
return table().maybeViewsUnbarriered(obj);
|
||||
}
|
||||
void removeViews(ArrayBufferObject* obj) { table().removeViews(obj); }
|
||||
void sweepAfterMinorGC() { table().sweepAfterMinorGC(); }
|
||||
bool needsSweepAfterMinorGC() const { return table().needsSweepAfterMinorGC(); }
|
||||
size_t sizeOfExcludingThis(mozilla::MallocSizeOf mallocSizeOf) {
|
||||
return table().sizeOfExcludingThis(mallocSizeOf);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue