Bug 1600283 - Remove uses of already_AddRefed. r=#dom-workers-and-storage draft
authorSimon Giesecke <sgiesecke@mozilla.com>
Wed, 04 Dec 2019 16:49:42 +0000
changeset 2515999 c6b500ac4ca3e2ab03072fa39f5c2bcd716de54d
parent 2515998 14e7993a4e98e98cb31ca5e3cf002d3e10de0aa9
child 2516000 3cd460937c359d6e699cc038f4cc223b58c98ef4
push id460090
push userreviewbot
push dateWed, 04 Dec 2019 16:51:29 +0000
treeherdertry@35d310cdd9cf [default view] [failures only]
bugs1600283
milestone73.0a1
Bug 1600283 - Remove uses of already_AddRefed. r=#dom-workers-and-storage Differential Revision: https://phabricator.services.mozilla.com/D55504 Differential Diff: PHID-DIFF-jm2om53g5rk4zio6u3s7
dom/indexedDB/ActorsParent.cpp
--- a/dom/indexedDB/ActorsParent.cpp
+++ b/dom/indexedDB/ActorsParent.cpp
@@ -7514,17 +7514,17 @@ class IndexRequestOpBase : public Normal
   IndexRequestOpBase(TransactionBase* aTransaction,
                      const RequestParams& aParams)
       : NormalTransactionOp(aTransaction),
         mMetadata(IndexMetadataForParams(aTransaction, aParams)) {}
 
   ~IndexRequestOpBase() override = default;
 
  private:
-  static already_AddRefed<FullIndexMetadata> IndexMetadataForParams(
+  static RefPtr<FullIndexMetadata> IndexMetadataForParams(
       TransactionBase* aTransaction, const RequestParams& aParams);
 };
 
 class IndexGetRequestOp final : public IndexRequestOpBase {
   friend class TransactionBase;
 
   RefPtr<Database> mDatabase;
   const Maybe<SerializedKeyRange> mOptionalKeyRange;
@@ -25466,17 +25466,17 @@ nsresult ObjectStoreCountRequestOp::DoDa
   }
 
   mResponse.count() = count;
 
   return NS_OK;
 }
 
 // static
-already_AddRefed<FullIndexMetadata> IndexRequestOpBase::IndexMetadataForParams(
+RefPtr<FullIndexMetadata> IndexRequestOpBase::IndexMetadataForParams(
     TransactionBase* aTransaction, const RequestParams& aParams) {
   AssertIsOnBackgroundThread();
   MOZ_ASSERT(aTransaction);
   MOZ_ASSERT(aParams.type() == RequestParams::TIndexGetParams ||
              aParams.type() == RequestParams::TIndexGetKeyParams ||
              aParams.type() == RequestParams::TIndexGetAllParams ||
              aParams.type() == RequestParams::TIndexGetAllKeysParams ||
              aParams.type() == RequestParams::TIndexCountParams);
@@ -25527,17 +25527,17 @@ already_AddRefed<FullIndexMetadata> Inde
   const RefPtr<FullObjectStoreMetadata> objectStoreMetadata =
       aTransaction->GetMetadataForObjectStoreId(objectStoreId);
   MOZ_ASSERT(objectStoreMetadata);
 
   RefPtr<FullIndexMetadata> indexMetadata =
       aTransaction->GetMetadataForIndexId(objectStoreMetadata, indexId);
   MOZ_ASSERT(indexMetadata);
 
-  return indexMetadata.forget();
+  return indexMetadata;
 }
 
 IndexGetRequestOp::IndexGetRequestOp(TransactionBase* aTransaction,
                                      const RequestParams& aParams, bool aGetAll)
     : IndexRequestOpBase(aTransaction, aParams),
       mDatabase(aTransaction->GetDatabase()),
       mOptionalKeyRange(aGetAll
                             ? aParams.get_IndexGetAllParams().optionalKeyRange()