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 490134 ee8274a9b6c09241f0da9b6ed3b83a95b8091574
parent 490133 a42a9fc0c5f4bc801873a3803ffefbe0761c9b59
child 490135 1dc2238f2ba7cf0a41b7d8901aff2f60e9b7d74e
push id247
push userfmarier@mozilla.com
push dateSat, 27 Oct 2018 01:06:44 +0000
reviewersjld
bugs1445994
milestone64.0a1
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) {