зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1352772 - Send permissions to the content process before dispatching push events, r=catalinb
MozReview-Commit-ID: DVLjumi9iBJ
This commit is contained in:
Родитель
5a9e0a94bc
Коммит
3e2ea2116b
|
@ -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.
|
||||
|
|
|
@ -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);
|
||||
|
|
Загрузка…
Ссылка в новой задаче