mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 21:31:04 +00:00
Bug 1473856 - MediaQueryList could use ProbablyShortLivingWrapper + LastRelease, r=bz
--HG-- extra : rebase_source : 71091f1a58a11648fb87c5639f5ac85bd1e9760e
This commit is contained in:
parent
2ced7f0d8b
commit
9456afdee0
@ -10,6 +10,7 @@
|
||||
* liability, trademark and document use rules apply.
|
||||
*/
|
||||
|
||||
[ProbablyShortLivingWrapper]
|
||||
interface MediaQueryList : EventTarget {
|
||||
readonly attribute DOMString media;
|
||||
readonly attribute boolean matches;
|
||||
|
@ -66,6 +66,14 @@ public:
|
||||
size_t SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const;
|
||||
|
||||
private:
|
||||
void LastRelease() final
|
||||
{
|
||||
auto listElement = static_cast<LinkedListElement<MediaQueryList>*>(this);
|
||||
if (listElement->isInList()) {
|
||||
listElement->remove();
|
||||
}
|
||||
}
|
||||
|
||||
void RecomputeMatches();
|
||||
|
||||
// We only need a pointer to the document to support lazy
|
||||
|
Loading…
Reference in New Issue
Block a user