Bug 1600283 - Remove uses of plain pointers. r=#dom-workers-and-storage draft
authorSimon Giesecke <sgiesecke@mozilla.com>
Wed, 04 Dec 2019 16:48:19 +0000
changeset 2515982 0f03088f329695f6fded09420b6e81e5233d402c
parent 2515981 1737bc9309cf76c6498d01df6f83b50fcd83aef7
child 2515983 9d6bd76d7d19b00bb405ab210a4c3f1fb6496cbd
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 plain pointers. r=#dom-workers-and-storage Differential Revision: https://phabricator.services.mozilla.com/D55485 Differential Diff: PHID-DIFF-5vx5cx5fxnwhdip2gpr5
dom/indexedDB/ActorsChild.cpp
--- a/dom/indexedDB/ActorsChild.cpp
+++ b/dom/indexedDB/ActorsChild.cpp
@@ -2951,17 +2951,17 @@ nsresult BackgroundRequestChild::Preproc
   // used on workers too.
   nsCOMPtr<nsIEventTarget> target =
       do_GetService(NS_STREAMTRANSPORTSERVICE_CONTRACTID);
   MOZ_ASSERT(target);
 
   // We use a TaskQueue here in order to be sure that the events are dispatched
   // in the correct order. This is not guaranteed in case we use the I/O thread
   // directly.
-  mTaskQueue = new TaskQueue(target.forget());
+  mTaskQueue = MakeRefPtr<TaskQueue>(target.forget());
   mTaskQueueEventTarget = mTaskQueue->WrapAsEventTarget();
 
   ErrorResult errorResult;
 
   nsCOMPtr<nsIInputStream> stream;
   aFile.mBlob->CreateInputStream(getter_AddRefs(stream), errorResult);
   if (NS_WARN_IF(errorResult.Failed())) {
     return errorResult.StealNSResult();