Bug 1445994: Rename variables to kungFuDeathGrip to make it clear it's keeping a reference alive. r=jld
authorDiego Pino Garcia <dpino@igalia.com>
Thu, 18 Oct 2018 00:26:00 -0400
changeset 500345 ee8274a9b6c09241f0da9b6ed3b83a95b8091574
parent 500344 a42a9fc0c5f4bc801873a3803ffefbe0761c9b59
child 500346 1dc2238f2ba7cf0a41b7d8901aff2f60e9b7d74e
push id1864
push userffxbld-merge
push dateMon, 03 Dec 2018 15:51:40 +0000
treeherdermozilla-release@f040763d99ad [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjld
bugs1445994
milestone64.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1445994: Rename variables to kungFuDeathGrip to make it clear it's keeping a reference alive. r=jld
dom/ipc/ContentParent.cpp
--- a/dom/ipc/ContentParent.cpp
+++ b/dom/ipc/ContentParent.cpp
@@ -1587,17 +1587,17 @@ ContentParent::MarkAsDead()
 {
   MarkAsTroubled();
   mIsAlive = false;
 }
 
 void
 ContentParent::OnChannelError()
 {
-  RefPtr<ContentParent> content(this);
+  RefPtr<ContentParent> kungFuDeathGrip(this);
   PContentParent::OnChannelError();
 }
 
 void
 ContentParent::OnChannelConnected(int32_t pid)
 {
   MOZ_ASSERT(NS_IsMainThread());
 
@@ -1733,24 +1733,24 @@ DelayedDeleteSubprocess(GeckoChildProces
 
 // This runnable only exists to delegate ownership of the
 // ContentParent to this runnable, until it's deleted by the event
 // system.
 struct DelayedDeleteContentParentTask : public Runnable
 {
   explicit DelayedDeleteContentParentTask(ContentParent* aObj)
     : Runnable("dom::DelayedDeleteContentParentTask")
-    , mObj(aObj)
+    , mKungFuDeathGrip(aObj)
   {
   }
 
   // No-op
   NS_IMETHOD Run() override { return NS_OK; }
 
-  RefPtr<ContentParent> mObj;
+  RefPtr<ContentParent> mKungFuDeathGrip;
 };
 
 } // namespace
 
 void
 ContentParent::ActorDestroy(ActorDestroyReason why)
 {
   if (mForceKillTimer) {