Bug 1167406 - Mark nsRootPresContext::RunWillPaintObservers::mPresContext as MOZ_NON_OWNING_REF. r=dbaron
authorMichael Layzell <michael@thelayzells.com>
Wed, 17 Jun 2015 11:48:00 +0200
changeset 250687 5f973e6a9fac3935dad37d2b4ff3460f18fa496e
parent 250686 ade5f5dd22ea3072588d1f25c6f82693b4bec470
child 250688 f3b6460a443c3cb9eaf5885a3f5adcff8d621b31
push idunknown
push userunknown
push dateunknown
reviewersdbaron
bugs1167406
milestone42.0a1
Bug 1167406 - Mark nsRootPresContext::RunWillPaintObservers::mPresContext as MOZ_NON_OWNING_REF. r=dbaron
layout/base/nsPresContext.h
--- a/layout/base/nsPresContext.h
+++ b/layout/base/nsPresContext.h
@@ -1526,17 +1526,18 @@ protected:
     void Revoke() { mPresContext = nullptr; }
     NS_IMETHOD Run() override
     {
       if (mPresContext) {
         mPresContext->FlushWillPaintObservers();
       }
       return NS_OK;
     }
-    nsRootPresContext* mPresContext;
+    // The lifetime of this reference is handled by an nsRevocableEventPtr
+    nsRootPresContext* MOZ_NON_OWNING_REF mPresContext;
   };
 
   friend class nsPresContext;
 
   nsCOMPtr<nsITimer> mNotifyDidPaintTimer;
   nsCOMPtr<nsITimer> mApplyPluginGeometryTimer;
   nsTHashtable<nsRefPtrHashKey<nsIContent> > mRegisteredPlugins;
   nsTArray<nsCOMPtr<nsIRunnable> > mWillPaintObservers;