mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 21:31:04 +00:00
Bug 1439099 P2 Remove ServiceWorkerRegistrationInfo::GetByID(). r=asuth
This commit is contained in:
parent
ced996a4df
commit
e67b89fe1c
@ -569,10 +569,9 @@ ClientSource::PostMessage(const ClientPostMessageArgs& aArgs)
|
||||
RefPtr<ServiceWorkerRegistrationInfo> reg =
|
||||
swm->GetRegistration(principal, source.Scope());
|
||||
if (reg) {
|
||||
RefPtr<ServiceWorkerInfo> serviceWorker = reg->GetByID(source.Id());
|
||||
if (serviceWorker) {
|
||||
RefPtr<ServiceWorker> instance =
|
||||
globalObject->GetOrCreateServiceWorker(source);
|
||||
RefPtr<ServiceWorker> instance =
|
||||
globalObject->GetOrCreateServiceWorker(source);
|
||||
if (instance) {
|
||||
init.mSource.SetValue().SetAsServiceWorker() = instance;
|
||||
}
|
||||
}
|
||||
|
@ -491,24 +491,6 @@ ServiceWorkerRegistrationInfo::GetActive() const
|
||||
return mActiveWorker;
|
||||
}
|
||||
|
||||
ServiceWorkerInfo*
|
||||
ServiceWorkerRegistrationInfo::GetByID(uint64_t aID) const
|
||||
{
|
||||
if (mActiveWorker && mActiveWorker->ID() == aID) {
|
||||
return mActiveWorker;
|
||||
}
|
||||
if (mWaitingWorker && mWaitingWorker->ID() == aID) {
|
||||
return mWaitingWorker;
|
||||
}
|
||||
if (mInstallingWorker && mInstallingWorker->ID() == aID) {
|
||||
return mInstallingWorker;
|
||||
}
|
||||
if (mEvaluatingWorker && mEvaluatingWorker->ID() == aID) {
|
||||
return mEvaluatingWorker;
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
ServiceWorkerInfo*
|
||||
ServiceWorkerRegistrationInfo::GetByDescriptor(const ServiceWorkerDescriptor& aDescriptor) const
|
||||
{
|
||||
|
@ -151,9 +151,6 @@ public:
|
||||
ServiceWorkerInfo*
|
||||
GetActive() const;
|
||||
|
||||
ServiceWorkerInfo*
|
||||
GetByID(uint64_t aID) const;
|
||||
|
||||
ServiceWorkerInfo*
|
||||
GetByDescriptor(const ServiceWorkerDescriptor& aDescriptor) const;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user