diff --git a/dom/push/PushNotifier.cpp b/dom/push/PushNotifier.cpp index 181b79c7869a..f0949fbb7588 100644 --- a/dom/push/PushNotifier.cpp +++ b/dom/push/PushNotifier.cpp @@ -108,6 +108,11 @@ PushNotifier::Dispatch(PushDispatcher& aDispatcher) // At least one content process is active, so e10s must be enabled. // Broadcast a message to notify observers and service workers. for (uint32_t i = 0; i < contentActors.Length(); ++i) { + // Ensure that the content actor has the permissions avaliable for the + // principal the push is being sent for before sending the push message + // down. + Unused << contentActors[i]-> + TransmitPermissionsForPrincipal(aDispatcher.GetPrincipal()); if (aDispatcher.SendToChild(contentActors[i])) { // Only send the push message to the first content process to avoid // multiple SWs showing the same notification. See bug 1300112. diff --git a/dom/push/PushNotifier.h b/dom/push/PushNotifier.h index 878e601dfce7..afc80cff0f4d 100644 --- a/dom/push/PushNotifier.h +++ b/dom/push/PushNotifier.h @@ -51,6 +51,10 @@ public: // are no active content processes. The default behavior is a no-op. virtual nsresult HandleNoChildProcesses(); + nsIPrincipal* GetPrincipal() { + return mPrincipal; + } + protected: PushDispatcher(const nsACString& aScope, nsIPrincipal* aPrincipal);