mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 13:51:41 +00:00
Bug 1459209 P11 Propogate registration state changes back from the parent to the child. r=mrbkap
--HG-- extra : rebase_source : 86bea6e7bcf6376d1fc5366a1a07b208f3805ce0
This commit is contained in:
parent
39b1a104c9
commit
e9dc1bae32
@ -21,6 +21,8 @@ parent:
|
||||
|
||||
child:
|
||||
async __delete__();
|
||||
|
||||
async UpdateState(IPCServiceWorkerRegistrationDescriptor aDescriptor);
|
||||
};
|
||||
|
||||
} // namespace dom
|
||||
|
@ -161,5 +161,13 @@ RemoteServiceWorkerRegistrationImpl::RevokeActor(ServiceWorkerRegistrationChild*
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
RemoteServiceWorkerRegistrationImpl::UpdateState(const ServiceWorkerRegistrationDescriptor& aDescriptor)
|
||||
{
|
||||
if (mOuter) {
|
||||
mOuter->UpdateState(aDescriptor);
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace dom
|
||||
} // namespace mozilla
|
||||
|
@ -46,6 +46,9 @@ public:
|
||||
void
|
||||
RevokeActor(ServiceWorkerRegistrationChild* aActor);
|
||||
|
||||
void
|
||||
UpdateState(const ServiceWorkerRegistrationDescriptor& aDescriptor);
|
||||
|
||||
NS_INLINE_DECL_REFCOUNTING(RemoteServiceWorkerRegistrationImpl, override)
|
||||
};
|
||||
|
||||
|
@ -11,6 +11,8 @@
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
using mozilla::ipc::IPCResult;
|
||||
|
||||
void
|
||||
ServiceWorkerRegistrationChild::ActorDestroy(ActorDestroyReason aReason)
|
||||
{
|
||||
@ -25,6 +27,15 @@ ServiceWorkerRegistrationChild::ActorDestroy(ActorDestroyReason aReason)
|
||||
}
|
||||
}
|
||||
|
||||
IPCResult
|
||||
ServiceWorkerRegistrationChild::RecvUpdateState(const IPCServiceWorkerRegistrationDescriptor& aDescriptor)
|
||||
{
|
||||
if (mOwner) {
|
||||
mOwner->UpdateState(ServiceWorkerRegistrationDescriptor(aDescriptor));
|
||||
}
|
||||
return IPC_OK();
|
||||
}
|
||||
|
||||
void
|
||||
ServiceWorkerRegistrationChild::WorkerShuttingDown()
|
||||
{
|
||||
|
@ -26,6 +26,9 @@ class ServiceWorkerRegistrationChild final : public PServiceWorkerRegistrationCh
|
||||
void
|
||||
ActorDestroy(ActorDestroyReason aReason) override;
|
||||
|
||||
mozilla::ipc::IPCResult
|
||||
RecvUpdateState(const IPCServiceWorkerRegistrationDescriptor& aDescriptor) override;
|
||||
|
||||
// WorkerHolderToken::Listener
|
||||
void
|
||||
WorkerShuttingDown() override;
|
||||
|
@ -39,7 +39,7 @@ ServiceWorkerRegistrationProxy::UpdateStateOnBGThread(const ServiceWorkerRegistr
|
||||
if (!mActor) {
|
||||
return;
|
||||
}
|
||||
// TODO: send update
|
||||
Unused << mActor->SendUpdateState(aDescriptor.ToIPC());
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
Reference in New Issue
Block a user