Bug 1341040 Rename ServiceWorkerInfo::GetPrincipal() to Principal(). r=baku
authorBen Kelly <ben@wanderview.com>
Mon, 20 Feb 2017 10:31:32 -0500
changeset 343902 a11eaf441b2cfaaeb67e25e93859478e12d08ee2
parent 343901 6b22d70e15f5d0a3955e2535573dd8ae18555b87
child 343903 6449178dd01f40c80d62efd7aaa4193e212e4cea
push id31391
push userphilringnalda@gmail.com
push dateTue, 21 Feb 2017 04:29:09 +0000
treeherdermozilla-central@d84beb192e57 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbaku
bugs1341040
milestone54.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1341040 Rename ServiceWorkerInfo::GetPrincipal() to Principal(). r=baku
dom/workers/ServiceWorkerInfo.h
dom/workers/ServiceWorkerManager.cpp
dom/workers/ServiceWorkerPrivate.cpp
--- a/dom/workers/ServiceWorkerInfo.h
+++ b/dom/workers/ServiceWorkerInfo.h
@@ -67,17 +67,17 @@ public:
   class ServiceWorkerPrivate*
   WorkerPrivate() const
   {
     MOZ_ASSERT(mServiceWorkerPrivate);
     return mServiceWorkerPrivate;
   }
 
   nsIPrincipal*
-  GetPrincipal() const
+  Principal() const
   {
     return mPrincipal;
   }
 
   const nsCString&
   ScriptSpec() const
   {
     return mScriptSpec;
--- a/dom/workers/ServiceWorkerManager.cpp
+++ b/dom/workers/ServiceWorkerManager.cpp
@@ -1012,17 +1012,17 @@ ServiceWorkerManager::SendPushEvent(cons
   }
 
   ServiceWorkerInfo* serviceWorker = GetActiveWorkerInfoForScope(attrs, aScope);
   if (NS_WARN_IF(!serviceWorker)) {
     return NS_ERROR_FAILURE;
   }
 
   RefPtr<ServiceWorkerRegistrationInfo> registration =
-    GetRegistration(serviceWorker->GetPrincipal(), aScope);
+    GetRegistration(serviceWorker->Principal(), aScope);
   MOZ_DIAGNOSTIC_ASSERT(registration);
 
   return serviceWorker->WorkerPrivate()->SendPushEvent(aMessageId, aData,
                                                        registration);
 }
 
 NS_IMETHODIMP
 ServiceWorkerManager::SendPushSubscriptionChangeEvent(const nsACString& aOriginAttributes,
@@ -1372,17 +1372,17 @@ ServiceWorkerManager::NotifyUnregister(n
 
 void
 ServiceWorkerManager::WorkerIsIdle(ServiceWorkerInfo* aWorker)
 {
   AssertIsOnMainThread();
   MOZ_DIAGNOSTIC_ASSERT(aWorker);
 
   RefPtr<ServiceWorkerRegistrationInfo> reg =
-    GetRegistration(aWorker->GetPrincipal(), aWorker->Scope());
+    GetRegistration(aWorker->Principal(), aWorker->Scope());
   if (!reg) {
     return;
   }
 
   if (reg->GetActive() != aWorker) {
     return;
   }
 
--- a/dom/workers/ServiceWorkerPrivate.cpp
+++ b/dom/workers/ServiceWorkerPrivate.cpp
@@ -1608,17 +1608,17 @@ ServiceWorkerPrivate::SendFetchEvent(nsI
   AssertIsOnMainThread();
 
   RefPtr<ServiceWorkerManager> swm = ServiceWorkerManager::GetInstance();
   if (NS_WARN_IF(!mInfo || !swm)) {
     return NS_ERROR_FAILURE;
   }
 
   RefPtr<ServiceWorkerRegistrationInfo> registration =
-    swm->GetRegistration(mInfo->GetPrincipal(), mInfo->Scope());
+    swm->GetRegistration(mInfo->Principal(), mInfo->Scope());
 
   // Its possible the registration is removed between starting the interception
   // and actually dispatching the fetch event.  In these cases we simply
   // want to restart the original network request.  Since this is a normal
   // condition we handle the reset here instead of returning an error which
   // would in turn trigger a console report.
   if (!registration) {
     aChannel->ResetInterception();
@@ -1732,17 +1732,17 @@ ServiceWorkerPrivate::SpawnWorkerIfNeede
                     nsIChannel::LOAD_BYPASS_SERVICE_WORKER;
 
   rv = info.mBaseURI->GetHost(info.mDomain);
   if (NS_WARN_IF(NS_FAILED(rv))) {
     return rv;
   }
 
   nsCOMPtr<nsIURI> uri;
-  rv = mInfo->GetPrincipal()->GetURI(getter_AddRefs(uri));
+  rv = mInfo->Principal()->GetURI(getter_AddRefs(uri));
   if (NS_WARN_IF(NS_FAILED(rv))) {
     return rv;
   }
 
   if (NS_WARN_IF(!uri)) {
     return NS_ERROR_FAILURE;
   }