DescriptionService Worker: (Re-commit) Make ServiceWorkerRegistration.update() return a promise. (Blink 1/3)
* The original CL was committed but reverted due to a leak report: https://codereview.chromium.org/1267703003/#msg29.
This CL re-commits the original CL with a patch for the leak. This change will
also be existed temporarily until the chromium-side patch will land.
--
As per the resolution of f2f, ServiceWorkerRegistration.update() should return a
promise that transforms the promise returned by Update algorithm.
In this CL, ServiceWorkerContextCore::UpdateServiceWorker method has been
overloaded to cover two invocation paths: a scheduled update without a
provider_host and a callback (Soft Update in the spec) and a call initiated from
the script surface using ServiceWorkerRegistration.update().
This is a web-exposed API change. But it has no compatibility risk because
existing user code doesn't expect to receive anything from update().
Spec: https://slightlyoff.github.io/ServiceWorker/spec/service_worker/#service-worker-registration-update
Spec discussion: https://github.com/slightlyoff/ServiceWorker/issues/311
Companion CL (Chromium): https://codereview.chromium.org/1270513002/
Companion CL (Blink layout test): https://codereview.chromium.org/1268663003/
BUG=513655
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=199875
Patch Set 1 #
Total comments: 2
Patch Set 2 : Remove |this| for calling its own method. #
Messages
Total messages: 14 (3 generated)
|