Bug 1340771 part 4 - Mark AutoWeakFrame as MOZ_NONHEAP_CLASS and WeakFrame as MOZ_HEAP_CLASS. r=tn
authorMats Palmgren <mats@mozilla.com>
Wed, 01 Mar 2017 18:03:14 +0100
changeset 374558 3cf51d656aef11c9a9d2bb8bc91cb08cd4fa7637
parent 374557 cb8eb0ca05acd0dcded6012c5e5ec0f7d6813c6b
child 374559 beca679d682be56233f8ad362ebcf190626be20d
push id10863
push userjlorenzo@mozilla.com
push dateMon, 06 Mar 2017 23:02:23 +0000
treeherdermozilla-aurora@0931190cd725 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
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: 8yGBKyx3TDW
layout/generic/nsIFrame.h
--- a/layout/generic/nsIFrame.h
+++ b/layout/generic/nsIFrame.h
@@ -3824,17 +3824,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)
   {
@@ -3900,17 +3900,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());
   }