Bug 1340771 part 4 - Mark AutoWeakFrame as MOZ_NONHEAP_CLASS and WeakFrame as MOZ_HEAP_CLASS. r=tn
MozReview-Commit-ID: Lq8gIixyWV4
--- a/layout/generic/nsIFrame.h
+++ b/layout/generic/nsIFrame.h
@@ -3811,17 +3811,17 @@ public:
* Create AutoWeakFrame object when it is sure that nsIFrame object
* is alive and after some operations which may destroy the nsIFrame
* (for example any DOM modifications) use IsAlive() or GetFrame() methods to
* check whether it is safe to continue to use the nsIFrame object.
*
* @note The usage of this class should be kept to a minimum.
*/
class WeakFrame;
-class AutoWeakFrame
+class MOZ_NONHEAP_CLASS AutoWeakFrame
{
public:
explicit AutoWeakFrame()
: mPrev(nullptr), mFrame(nullptr) {}
AutoWeakFrame(const AutoWeakFrame& aOther)
: mPrev(nullptr), mFrame(nullptr)
{
@@ -3887,17 +3887,17 @@ private:
AutoWeakFrame* mPrev;
nsIFrame* mFrame;
};
/**
* @see AutoWeakFrame
*/
-class WeakFrame
+class MOZ_HEAP_CLASS WeakFrame
{
public:
WeakFrame() : mFrame(nullptr) {}
WeakFrame(const WeakFrame& aOther) : mFrame(nullptr)
{
Init(aOther.GetFrame());
}