From d3237cadc50d99c7e2334a42a3bf26658b0159d6 Mon Sep 17 00:00:00 2001 From: Ehsan Akhgari Date: Mon, 28 Jul 2014 09:57:31 -0400 Subject: [PATCH] Bug 1044598 - Part 2: Make ServiceWorkerManager::GetServiceWorkerRegistration honor XPCOM rules; r=smaug --HG-- extra : rebase_source : 6fcd656cae5db25b99c70a6d2c901409fb751755 --- dom/workers/ServiceWorkerManager.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dom/workers/ServiceWorkerManager.cpp b/dom/workers/ServiceWorkerManager.cpp index c45a3ac9ddc..a6a82edcd7e 100644 --- a/dom/workers/ServiceWorkerManager.cpp +++ b/dom/workers/ServiceWorkerManager.cpp @@ -1213,12 +1213,12 @@ ServiceWorkerManager::GetServiceWorkerRegistration(nsIURI* aURI) return nullptr; } - ServiceWorkerRegistration* registration; - domainInfo->mServiceWorkerRegistrations.Get(scope, ®istration); + nsRefPtr registration; + domainInfo->mServiceWorkerRegistrations.Get(scope, getter_AddRefs(registration)); // ordered scopes and registrations better be in sync. MOZ_ASSERT(registration); - return registration; + return registration.forget(); } namespace {