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

Issue 723923002: ServiceWorker: Add support for .skipWaiting and controllerchange event(1/3) (Closed)

Created:
6 years, 1 month ago by xiang
Modified:
6 years ago
CC:
blink-reviews, michaeln, jsbell+serviceworker_chromium.org, kenjibaheux+watch_chromium.org, tzik, serviceworker-reviews, nhiroki, dglazkov+blink, kinuko+serviceworker, horo+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Project:
blink
Visibility:
Public.

Description

ServiceWorker: Add support for .skipWaiting and controllerchange event(1/3) ServiceWorkerGlobalScope will pass .skipWaiting promise resolver callback to worker client which will resolve it after Chrome handles it. Make ServiceWorkerContainer inherits EventTarget in order to receive "controllerchange" event triggered by .skipWaiting. Spec: http://slightlyoff.github.io/ServiceWorker/spec/service_worker/#service-worker-global-scope-skipwaiting https://slightlyoff.github.io/ServiceWorker/spec/service_worker/#service-worker-container-controllerchange-event (1/3): This (2/3): https://codereview.chromium.org/717353004/ (3/3): https://codereview.chromium.org/765323002/ BUG=370742 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=186387

Patch Set 1 #

Total comments: 25

Patch Set 2 : webcallback->skipwaitingcallbacks, test re-write #

Total comments: 8

Patch Set 3 : split the CL #

Total comments: 7

Patch Set 4 : #

Total comments: 2

Patch Set 5 : #

Patch Set 6 : update property tests #

Unified diffs Side-by-side diffs Delta from patch set Stats (+98 lines, -8 lines) Patch
M LayoutTests/fast/dom/Window/property-access-on-cached-properties-after-frame-navigated-expected.txt View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M LayoutTests/fast/dom/Window/property-access-on-cached-properties-after-frame-removed-and-gced-expected.txt View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M LayoutTests/fast/dom/Window/property-access-on-cached-properties-after-frame-removed-expected.txt View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M LayoutTests/fast/dom/Window/property-access-on-cached-window-after-frame-navigated-expected.txt View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M LayoutTests/fast/dom/Window/property-access-on-cached-window-after-frame-removed-and-gced-expected.txt View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M LayoutTests/fast/dom/Window/property-access-on-cached-window-after-frame-removed-expected.txt View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/events/EventTypeNames.in View 1 1 chunk +1 line, -0 lines 0 comments Download
M Source/modules/EventTargetModulesFactory.in View 1 chunk +1 line, -0 lines 0 comments Download
M Source/modules/serviceworkers/ServiceWorkerContainer.h View 1 2 3 3 chunks +12 lines, -3 lines 0 comments Download
M Source/modules/serviceworkers/ServiceWorkerContainer.cpp View 1 2 3 4 chunks +10 lines, -1 line 0 comments Download
M Source/modules/serviceworkers/ServiceWorkerContainer.idl View 1 1 chunk +3 lines, -2 lines 0 comments Download
M Source/modules/serviceworkers/ServiceWorkerGlobalScope.h View 1 2 chunks +4 lines, -0 lines 0 comments Download
M Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp View 1 2 chunks +27 lines, -0 lines 0 comments Download
M Source/modules/serviceworkers/ServiceWorkerGlobalScope.idl View 1 1 chunk +2 lines, -0 lines 0 comments Download
M Source/modules/serviceworkers/ServiceWorkerGlobalScopeClient.h View 1 2 2 chunks +2 lines, -1 line 0 comments Download
M Source/web/ServiceWorkerGlobalScopeClientImpl.h View 1 2 2 chunks +2 lines, -0 lines 0 comments Download
M Source/web/ServiceWorkerGlobalScopeClientImpl.cpp View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M public/platform/WebServiceWorkerProviderClient.h View 1 2 1 chunk +2 lines, -1 line 0 comments Download
A public/platform/WebServiceWorkerSkipWaitingCallbacks.h View 1 2 3 4 1 chunk +16 lines, -0 lines 0 comments Download
M public/web/WebServiceWorkerContextClient.h View 1 2 2 chunks +5 lines, -0 lines 0 comments Download

Messages

Total messages: 31 (7 generated)
xiang
Hi, would you have a look of this? Thanks.
6 years, 1 month ago (2014-11-13 07:28:23 UTC) #2
xiang
PTAL, thanks!
6 years, 1 month ago (2014-11-13 07:28:57 UTC) #3
jsbell
Overall, looks pretty good. The tests are necessarily complex, so anything you can do to ...
6 years, 1 month ago (2014-11-13 23:07:51 UTC) #4
michaeln
https://codereview.chromium.org/723923002/diff/1/Source/modules/serviceworkers/ServiceWorkerContainer.cpp File Source/modules/serviceworkers/ServiceWorkerContainer.cpp (right): https://codereview.chromium.org/723923002/diff/1/Source/modules/serviceworkers/ServiceWorkerContainer.cpp#newcode227 Source/modules/serviceworkers/ServiceWorkerContainer.cpp:227: dispatchEvent(Event::create(EventTypeNames::controllerchange)); This event should only be raised in the ...
6 years, 1 month ago (2014-11-14 22:53:55 UTC) #6
xiang
Thanks for the review, I have rebased the patch and rewrite some of the tests. ...
6 years ago (2014-11-28 08:00:48 UTC) #8
falken
looks good, I think you'll need to land as a three-sided patch though, right? https://codereview.chromium.org/723923002/diff/40001/LayoutTests/http/tests/serviceworker/resources/skip-waiting-installed-worker.js ...
6 years ago (2014-12-01 02:28:48 UTC) #9
xiang
Thanks for the review, I have split this CL to two parts. https://codereview.chromium.org/723923002/diff/40001/LayoutTests/http/tests/serviceworker/resources/skip-waiting-installed-worker.js File LayoutTests/http/tests/serviceworker/resources/skip-waiting-installed-worker.js ...
6 years ago (2014-12-01 07:13:44 UTC) #10
falken
lgtm
6 years ago (2014-12-01 07:21:05 UTC) #11
xiang
tkent@ would you review the public/ part? Thanks!
6 years ago (2014-12-01 07:46:16 UTC) #13
tkent
https://codereview.chromium.org/723923002/diff/60001/Source/modules/serviceworkers/ServiceWorkerContainer.cpp File Source/modules/serviceworkers/ServiceWorkerContainer.cpp (right): https://codereview.chromium.org/723923002/diff/60001/Source/modules/serviceworkers/ServiceWorkerContainer.cpp#newcode246 Source/modules/serviceworkers/ServiceWorkerContainer.cpp:246: dispatchEvent(Event::create(EventTypeNames::controllerchange)); Is it possible to cause use-after-free by JavaScript ...
6 years ago (2014-12-01 07:57:14 UTC) #14
xiang
tkent, thanks for the review, would you take a look again? https://codereview.chromium.org/723923002/diff/60001/Source/modules/serviceworkers/ServiceWorkerContainer.cpp File Source/modules/serviceworkers/ServiceWorkerContainer.cpp (right): ...
6 years ago (2014-12-02 02:31:48 UTC) #15
tkent
https://codereview.chromium.org/723923002/diff/60001/Source/modules/serviceworkers/ServiceWorkerContainer.cpp File Source/modules/serviceworkers/ServiceWorkerContainer.cpp (right): https://codereview.chromium.org/723923002/diff/60001/Source/modules/serviceworkers/ServiceWorkerContainer.cpp#newcode246 Source/modules/serviceworkers/ServiceWorkerContainer.cpp:246: dispatchEvent(Event::create(EventTypeNames::controllerchange)); On 2014/12/02 02:31:48, xiang wrote: > On 2014/12/01 ...
6 years ago (2014-12-02 02:37:08 UTC) #16
xiang
On 2014/12/02 02:37:08, tkent wrote: > https://codereview.chromium.org/723923002/diff/60001/Source/modules/serviceworkers/ServiceWorkerContainer.cpp > File Source/modules/serviceworkers/ServiceWorkerContainer.cpp (right): > > https://codereview.chromium.org/723923002/diff/60001/Source/modules/serviceworkers/ServiceWorkerContainer.cpp#newcode246 > ...
6 years ago (2014-12-02 03:20:55 UTC) #17
tkent
On 2014/12/02 03:20:55, xiang wrote: > On 2014/12/02 02:37:08, tkent wrote: > > > https://codereview.chromium.org/723923002/diff/60001/Source/modules/serviceworkers/ServiceWorkerContainer.cpp ...
6 years ago (2014-12-02 04:41:11 UTC) #18
xiang
On 2014/12/02 04:41:11, tkent wrote: > On 2014/12/02 03:20:55, xiang wrote: > > On 2014/12/02 ...
6 years ago (2014-12-02 06:10:11 UTC) #19
tkent
I don't know the detail of Service Worker implementation. Service Worker team, please re-review this ...
6 years ago (2014-12-02 06:14:09 UTC) #20
falken
Hi tkent, > > JavaScript code can delete a document. > > > > ServiceWorkerContainer ...
6 years ago (2014-12-02 08:07:29 UTC) #21
tkent
It sounds ok. LGTM. https://codereview.chromium.org/723923002/diff/80001/public/platform/WebServiceWorkerSkipWaitingCallbacks.h File public/platform/WebServiceWorkerSkipWaitingCallbacks.h (right): https://codereview.chromium.org/723923002/diff/80001/public/platform/WebServiceWorkerSkipWaitingCallbacks.h#newcode8 public/platform/WebServiceWorkerSkipWaitingCallbacks.h:8: #include "WebCallbacks.h" "WebCallbacks.h" -> "public/platform/WebCallbacks.h"
6 years ago (2014-12-02 09:55:59 UTC) #22
xiang
A document close test during oncontrollerchange handler is added in the third patch. Thanks for ...
6 years ago (2014-12-03 00:12:07 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/723923002/100001
6 years ago (2014-12-03 00:12:43 UTC) #25
commit-bot: I haz the power
Try jobs failed on following builders: linux_blink_rel on tryserver.blink (http://build.chromium.org/p/tryserver.blink/builders/linux_blink_rel/builds/36504)
6 years ago (2014-12-03 01:24:39 UTC) #27
falken
On 2014/12/03 01:24:39, I haz the power (commit-bot) wrote: > Try jobs failed on following ...
6 years ago (2014-12-03 04:17:42 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/723923002/120001
6 years ago (2014-12-03 05:17:34 UTC) #30
commit-bot: I haz the power
6 years ago (2014-12-03 07:30:08 UTC) #31
Message was sent while issue was closed.
Committed patchset #6 (id:120001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=186387

Powered by Google App Engine
This is Rietveld 408576698