Bug 1122750 - Remove unnecessary destroy calls. r=khuey, a=sledru
authorBen Turner <bent.mozilla@gmail.com>
Wed, 21 Jan 2015 11:08:31 -0800
changeset 243042 508190797a80
parent 243041 bf8644a5c52a
child 243043 3aca4622bfd5
push id4371
push userryanvm@gmail.com
push date2015-01-26 16:42 +0000
treeherdermozilla-beta@3aca4622bfd5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskhuey, sledru
bugs1122750
milestone36.0
Bug 1122750 - Remove unnecessary destroy calls. r=khuey, a=sledru
dom/ipc/Blob.cpp
--- a/dom/ipc/Blob.cpp
+++ b/dom/ipc/Blob.cpp
@@ -2975,17 +2975,16 @@ BlobChild::GetOrCreateFromImpl(ChildMana
     }
   }
 
   BlobChild* actor = new BlobChild(aManager, aBlobImpl);
 
   ParentBlobConstructorParams params(blobParams);
 
   if (NS_WARN_IF(!aManager->SendPBlobConstructor(actor, params))) {
-    BlobChild::Destroy(actor);
     return nullptr;
   }
 
   return actor;
 }
 
 // static
 template <class ChildManagerType>
@@ -3040,17 +3039,16 @@ BlobChild::SendSliceConstructor(ChildMan
 
   if (aManager->SendPBlobConstructor(newActor, aParams)) {
     if (gProcessType != GeckoProcessType_Default || !NS_IsMainThread()) {
       newActor->SendWaitForSliceCreation();
     }
     return newActor;
   }
 
-  BlobChild::Destroy(newActor);
   return nullptr;
 }
 
 // static
 BlobChild*
 BlobChild::MaybeGetActorFromRemoteBlob(nsIRemoteBlob* aRemoteBlob,
                                        nsIContentChild* aManager)
 {
@@ -3523,17 +3521,16 @@ BlobParent::GetOrCreateFromImpl(ParentMa
   nsRefPtr<IDTableEntry> idTableEntry =
     IDTableEntry::GetOrCreate(id, ActorManagerProcessID(aManager), aBlobImpl);
   MOZ_ASSERT(idTableEntry);
 
   BlobParent* actor = new BlobParent(aManager, idTableEntry);
 
   ChildBlobConstructorParams params(id, blobParams);
   if (NS_WARN_IF(!aManager->SendPBlobConstructor(actor, params))) {
-    BlobParent::Destroy(actor);
     return nullptr;
   }
 
   return actor;
 }
 
 // static
 template <class ParentManagerType>
@@ -3689,17 +3686,16 @@ BlobParent::SendSliceConstructor(
 
   BlobParent* newActor = BlobParent::Create(aManager, aParams);
   MOZ_ASSERT(newActor);
 
   if (aManager->SendPBlobConstructor(newActor, aOtherSideParams)) {
     return newActor;
   }
 
-  BlobParent::Destroy(newActor);
   return nullptr;
 }
 
 // static
 BlobParent*
 BlobParent::MaybeGetActorFromRemoteBlob(nsIRemoteBlob* aRemoteBlob,
                                         nsIContentParent* aManager)
 {