зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1256428 P10 Remove ServiceWorkerRegistrationInfo::mUpdating flag. r=jdm
This commit is contained in:
Родитель
1bafe887a8
Коммит
6bdc298a74
|
@ -264,7 +264,6 @@ ServiceWorkerRegistrationInfo::ServiceWorkerRegistrationInfo(const nsACString& a
|
|||
, mLastUpdateCheckTime(0)
|
||||
, mScope(aScope)
|
||||
, mPrincipal(aPrincipal)
|
||||
, mUpdating(false)
|
||||
, mPendingUninstall(false)
|
||||
{}
|
||||
|
||||
|
@ -2898,15 +2897,13 @@ ServiceWorkerManager::SoftUpdate(const PrincipalOriginAttributes& aOriginAttribu
|
|||
// or its equivalent, with client, registration as its argument."
|
||||
// TODO(catalinb): We don't implement the force bypass cache flag.
|
||||
// See: https://github.com/slightlyoff/ServiceWorker/issues/759
|
||||
if (!registration->mUpdating) {
|
||||
RefPtr<ServiceWorkerJobQueue2> queue = GetOrCreateJobQueue(scopeKey,
|
||||
aScope);
|
||||
RefPtr<ServiceWorkerJobQueue2> queue = GetOrCreateJobQueue(scopeKey,
|
||||
aScope);
|
||||
|
||||
RefPtr<ServiceWorkerUpdateJob2> job =
|
||||
new ServiceWorkerUpdateJob2(principal, registration->mScope,
|
||||
newest->ScriptSpec(), nullptr);
|
||||
queue->ScheduleJob(job);
|
||||
}
|
||||
RefPtr<ServiceWorkerUpdateJob2> job =
|
||||
new ServiceWorkerUpdateJob2(principal, registration->mScope,
|
||||
newest->ScriptSpec(), nullptr);
|
||||
queue->ScheduleJob(job);
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
|
|
@ -81,12 +81,6 @@ public:
|
|||
|
||||
nsTArray<nsCOMPtr<nsIServiceWorkerRegistrationInfoListener>> mListeners;
|
||||
|
||||
// According to the spec, Soft Update shouldn't queue an update job
|
||||
// if the registration queue is not empty. Because our job queue
|
||||
// works slightly different, we use a flag to determine if the registration
|
||||
// is already updating.
|
||||
bool mUpdating;
|
||||
|
||||
// When unregister() is called on a registration, it is not immediately
|
||||
// removed since documents may be controlled. It is marked as
|
||||
// pendingUninstall and when all controlling documents go away, removed.
|
||||
|
|
|
@ -229,9 +229,6 @@ ServiceWorkerUpdateJob2::Update()
|
|||
// SetRegistration() must be called before Update().
|
||||
MOZ_ASSERT(mRegistration);
|
||||
|
||||
// TODO: I think we can remove mUpdating from registration now
|
||||
mRegistration->mUpdating = true;
|
||||
|
||||
if (Canceled()) {
|
||||
FailUpdateJob(NS_ERROR_DOM_ABORT_ERR);
|
||||
return;
|
||||
|
@ -377,9 +374,6 @@ ServiceWorkerUpdateJob2::ContinueUpdateAfterScriptEval(bool aScriptEvaluationRes
|
|||
{
|
||||
AssertIsOnMainThread();
|
||||
|
||||
// TODO: I think we can remove this now
|
||||
mRegistration->mUpdating = false;
|
||||
|
||||
if (Canceled()) {
|
||||
FailUpdateJob(NS_ERROR_DOM_ABORT_ERR);
|
||||
return;
|
||||
|
|
Загрузка…
Ссылка в новой задаче