Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1637)

Issue 1267703003: Service Worker: Make ServiceWorkerRegistration.update() return a promise. (Blink 1/3) (Closed)

Created:
5 years, 4 months ago by jungkees
Modified:
5 years, 4 months ago
CC:
blink-reviews, jsbell, tzik, serviceworker-reviews, dglazkov+blink, kinuko+serviceworker, horo
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Service Worker: Make ServiceWorkerRegistration.update() return a promise. (Blink 1/3) 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=199814

Patch Set 1 #

Patch Set 2 : Overload WebServiceWorkerRegistration::update() to land patch sets across the repos. #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+19 lines, -6 lines) Patch
M Source/modules/serviceworkers/ServiceWorkerRegistration.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/modules/serviceworkers/ServiceWorkerRegistration.cpp View 1 chunk +9 lines, -4 lines 0 comments Download
M Source/modules/serviceworkers/ServiceWorkerRegistration.idl View 1 chunk +1 line, -1 line 0 comments Download
M public/platform/WebServiceWorkerRegistration.h View 1 2 chunks +8 lines, -0 lines 2 comments Download

Messages

Total messages: 33 (8 generated)
jungkees
As per the f2f discussion, it's been decided to make registration.update() return a promise resolves ...
5 years, 4 months ago (2015-07-30 11:33:52 UTC) #2
zino
On 2015/07/30 11:33:52, jungkees wrote: > As per the f2f discussion, it's been decided to ...
5 years, 4 months ago (2015-07-31 00:38:51 UTC) #3
jungkees
zino@, thanks for the review and the discussion. As per our discussion, overloading the IDL ...
5 years, 4 months ago (2015-07-31 05:43:26 UTC) #4
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1267703003/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1267703003/20001
5 years, 4 months ago (2015-07-31 05:57:00 UTC) #7
commit-bot: I haz the power
Dry run: No L-G-T-M from a valid reviewer yet. Only full committers are accepted. Even ...
5 years, 4 months ago (2015-07-31 05:57:03 UTC) #9
nhiroki
https://codereview.chromium.org/1267703003/diff/20001/public/platform/WebServiceWorkerRegistration.h File public/platform/WebServiceWorkerRegistration.h (right): https://codereview.chromium.org/1267703003/diff/20001/public/platform/WebServiceWorkerRegistration.h#newcode36 public/platform/WebServiceWorkerRegistration.h:36: virtual void update(WebServiceWorkerProvider* provider, WebServiceWorkerUpdateCallbacks*) { this->update(provider); } How ...
5 years, 4 months ago (2015-07-31 06:56:32 UTC) #10
nhiroki
https://codereview.chromium.org/1267703003/diff/20001/public/platform/WebServiceWorkerRegistration.h File public/platform/WebServiceWorkerRegistration.h (right): https://codereview.chromium.org/1267703003/diff/20001/public/platform/WebServiceWorkerRegistration.h#newcode36 public/platform/WebServiceWorkerRegistration.h:36: virtual void update(WebServiceWorkerProvider* provider, WebServiceWorkerUpdateCallbacks*) { this->update(provider); } On ...
5 years, 4 months ago (2015-07-31 07:02:58 UTC) #11
zino
On 2015/07/31 06:56:32, nhiroki wrote: > https://codereview.chromium.org/1267703003/diff/20001/public/platform/WebServiceWorkerRegistration.h > File public/platform/WebServiceWorkerRegistration.h (right): > > https://codereview.chromium.org/1267703003/diff/20001/public/platform/WebServiceWorkerRegistration.h#newcode36 > ...
5 years, 4 months ago (2015-07-31 07:07:37 UTC) #12
nhiroki (google)
On 2015/07/31 07:07:37, zino wrote: > On 2015/07/31 06:56:32, nhiroki wrote: > > > https://codereview.chromium.org/1267703003/diff/20001/public/platform/WebServiceWorkerRegistration.h ...
5 years, 4 months ago (2015-07-31 07:17:11 UTC) #13
jungkees
Yes, right. The scripts will get the promise but just won't use it for that ...
5 years, 4 months ago (2015-07-31 07:21:37 UTC) #14
nhiroki
LGTM!
5 years, 4 months ago (2015-07-31 07:25:42 UTC) #15
nhiroki
(and sorry, I missed msg#4)
5 years, 4 months ago (2015-07-31 07:26:59 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1267703003/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1267703003/20001
5 years, 4 months ago (2015-07-31 07:27:05 UTC) #18
zino
I've just checked there was no regression after applying 1st(blink) and 2rd(chromium) patches. So, non-owner ...
5 years, 4 months ago (2015-07-31 07:30:18 UTC) #19
commit-bot: I haz the power
Try jobs failed on following builders: blink_presubmit on tryserver.blink (JOB_FAILED, http://build.chromium.org/p/tryserver.blink/builders/blink_presubmit/builds/38835)
5 years, 4 months ago (2015-07-31 07:32:26 UTC) #21
zino
On 2015/07/31 07:32:26, commit-bot: I haz the power wrote: > Try jobs failed on following ...
5 years, 4 months ago (2015-07-31 07:33:38 UTC) #23
tkent
This is a web-exposed API change. So, an API owner should review. This change is ...
5 years, 4 months ago (2015-07-31 08:16:43 UTC) #24
jungkees
Thanks for review tkent@. I updated the CL description with your comment.
5 years, 4 months ago (2015-07-31 10:12:55 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1267703003/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1267703003/20001
5 years, 4 months ago (2015-07-31 10:13:16 UTC) #27
commit-bot: I haz the power
Committed patchset #2 (id:20001) as https://src.chromium.org/viewvc/blink?view=rev&revision=199814
5 years, 4 months ago (2015-07-31 10:16:30 UTC) #28
johnme
A revert of this CL (patchset #2 id:20001) has been created in https://codereview.chromium.org/1264143002/ by johnme@chromium.org. ...
5 years, 4 months ago (2015-07-31 13:25:55 UTC) #29
jungkees
johnme@, thanks for reporting this. I carried out an investigation and just found the reason. ...
5 years, 4 months ago (2015-07-31 14:49:43 UTC) #30
johnme
On 2015/07/31 14:49:43, jungkees wrote: > Can I try this again followed by the chromium ...
5 years, 4 months ago (2015-07-31 17:07:52 UTC) #31
zino
jungkees@ Oh, I didn't think that far. I'm sorry. I think you can fix it ...
5 years, 4 months ago (2015-07-31 19:14:26 UTC) #32
jungkees
5 years, 4 months ago (2015-08-01 02:29:03 UTC) #33
Message was sent while issue was closed.
Thanks for the explanation johnme@. And I agree what zino@ suggested here.

So in order to try that, I think I need to upload a new snapshot with this
change and ask review to OWNERS again. Should I start a new CL for this? Or will
it work to do the update on this (closed) CL?

Powered by Google App Engine
This is Rietveld 408576698