Bug 1340771 part 4 - Mark AutoWeakFrame as MOZ_NONHEAP_CLASS and WeakFrame as MOZ_HEAP_CLASS. r=tn draft
authorMats Palmgren <mats@mozilla.com>
Mon, 27 Feb 2017 17:40:42 +0100
changeset 490078 5cade2579a01abd36a8046dcc431456bd937de8c
parent 490077 559f7a4ffbd50e0704d486328e77ad0340789cbc
child 547158 22b623ce4dc414d6db6e213656e485c26a306187
push id46987
push usermpalmgren@mozilla.com
push dateMon, 27 Feb 2017 16:44:31 +0000
reviewerstn
bugs1340771
milestone54.0a1
Bug 1340771 part 4 - Mark AutoWeakFrame as MOZ_NONHEAP_CLASS and WeakFrame as MOZ_HEAP_CLASS. r=tn MozReview-Commit-ID: Lq8gIixyWV4
layout/generic/nsIFrame.h
--- 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());
   }