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

Issue 2556893003: Remove ContextLifecycleObserver from NavigatorServiceWorker (Closed)

Created:
4 years ago by haraken
Modified:
4 years ago
Reviewers:
kinuko, nhiroki, dcheng, Wez
CC:
chromium-reviews, michaeln, jsbell+serviceworker_chromium.org, shimazu+serviceworker_chromium.org, serviceworker-reviews, kinuko+serviceworker, blink-reviews, horo+watch_chromium.org, falken+watch_chromium.org, tzik
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Remove ContextLifecycleObserver from NavigatorServiceWorker NavigatorServiceWorker needs to reset m_serviceWorker when the context gets destroyed. This CL makes ServiceWorkerContainer do the reset work and removes ContextLifecycleObserver from NavigatorServiceWorker. See the discussion on the CL for more rationale. BUG=610176 Committed: https://crrev.com/b76d5e11df4955210c8634da71836f31762186c9 Cr-Commit-Position: refs/heads/master@{#438475}

Patch Set 1 #

Total comments: 1

Patch Set 2 : temp #

Total comments: 1

Patch Set 3 : temp #

Total comments: 3

Messages

Total messages: 39 (11 generated)
haraken
PTAL
4 years ago (2016-12-07 06:41:25 UTC) #2
nhiroki
lgtm
4 years ago (2016-12-07 07:24:38 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2556893003/1
4 years ago (2016-12-07 07:27:11 UTC) #5
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_asan_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_asan_rel_ng/builds/274999)
4 years ago (2016-12-07 08:19:21 UTC) #7
haraken
service_worker_browsertest.cc is failing. I have a question. https://codereview.chromium.org/2556893003/diff/1/third_party/WebKit/Source/modules/serviceworkers/NavigatorServiceWorker.cpp File third_party/WebKit/Source/modules/serviceworkers/NavigatorServiceWorker.cpp (right): https://codereview.chromium.org/2556893003/diff/1/third_party/WebKit/Source/modules/serviceworkers/NavigatorServiceWorker.cpp#newcode105 third_party/WebKit/Source/modules/serviceworkers/NavigatorServiceWorker.cpp:105: if (!m_serviceWorker ...
4 years ago (2016-12-12 02:47:51 UTC) #8
nhiroki
On 2016/12/12 02:47:51, haraken wrote: > service_worker_browsertest.cc is failing. I have a question. > > ...
4 years ago (2016-12-12 11:49:03 UTC) #9
kinuko
On 2016/12/12 11:49:03, nhiroki wrote: > On 2016/12/12 02:47:51, haraken wrote: > > service_worker_browsertest.cc is ...
4 years ago (2016-12-13 03:17:59 UTC) #10
haraken
On 2016/12/13 03:17:59, kinuko wrote: > On 2016/12/12 11:49:03, nhiroki wrote: > > On 2016/12/12 ...
4 years ago (2016-12-13 05:38:21 UTC) #11
haraken
On 2016/12/13 05:38:21, haraken wrote: > On 2016/12/13 03:17:59, kinuko wrote: > > On 2016/12/12 ...
4 years ago (2016-12-13 08:20:14 UTC) #12
haraken
On 2016/12/13 05:38:21, haraken wrote: > On 2016/12/13 03:17:59, kinuko wrote: > > On 2016/12/12 ...
4 years ago (2016-12-13 08:37:54 UTC) #14
dcheng
On 2016/12/13 08:37:54, haraken wrote: > On 2016/12/13 05:38:21, haraken wrote: > > On 2016/12/13 ...
4 years ago (2016-12-13 08:56:46 UTC) #15
haraken
On 2016/12/13 08:56:46, dcheng wrote: > On 2016/12/13 08:37:54, haraken wrote: > > On 2016/12/13 ...
4 years ago (2016-12-13 09:01:52 UTC) #16
dcheng
On 2016/12/13 09:01:52, haraken wrote: > On 2016/12/13 08:56:46, dcheng wrote: > > On 2016/12/13 ...
4 years ago (2016-12-13 09:06:55 UTC) #17
haraken
On 2016/12/13 09:06:55, dcheng wrote: > On 2016/12/13 09:01:52, haraken wrote: > > On 2016/12/13 ...
4 years ago (2016-12-13 09:12:27 UTC) #18
kinuko
On Tue, Dec 13, 2016 at 2:38 PM, <haraken@chromium.org> wrote: > On 2016/12/13 03:17:59, kinuko ...
4 years ago (2016-12-13 16:15:18 UTC) #19
kinuko
On Tue, Dec 13, 2016 at 2:38 PM, <haraken@chromium.org> wrote: > On 2016/12/13 03:17:59, kinuko ...
4 years ago (2016-12-13 16:15:19 UTC) #20
blink-reviews
By the way we create NavigatorServiceWorker not in installSupplements but in FrameLoaderClientImpl::dispatchDidClearWindowObjectInMainWorld(), which could also ...
4 years ago (2016-12-13 16:35:27 UTC) #21
chromium-reviews
By the way we create NavigatorServiceWorker not in installSupplements but in FrameLoaderClientImpl::dispatchDidClearWindowObjectInMainWorld(), which could also ...
4 years ago (2016-12-13 16:35:28 UTC) #22
kinuko
(Meh. Above messages are from kinuko@. Not sure why they're duplicated, sorry if I spammed ...
4 years ago (2016-12-13 16:39:02 UTC) #23
haraken
Thanks kinuko-san! Updated the CL as you suggested. PTAL.
4 years ago (2016-12-14 05:53:08 UTC) #25
kinuko
Thanks! lgtm https://codereview.chromium.org/2556893003/diff/20001/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerContainer.h File third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerContainer.h (right): https://codereview.chromium.org/2556893003/diff/20001/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerContainer.h#newcode107 third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerContainer.h:107: explicit ServiceWorkerContainer(ExecutionContext*, NavigatorServiceWorker*); nit: no need of ...
4 years ago (2016-12-14 07:38:27 UTC) #26
haraken
> https://codereview.chromium.org/2556893003/diff/20001/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerContainer.h > File third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerContainer.h > (right): > > https://codereview.chromium.org/2556893003/diff/20001/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerContainer.h#newcode107 > third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerContainer.h:107: > explicit ServiceWorkerContainer(ExecutionContext*, ...
4 years ago (2016-12-14 08:03:07 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2556893003/40001
4 years ago (2016-12-14 08:03:46 UTC) #30
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years ago (2016-12-14 09:54:28 UTC) #33
commit-bot: I haz the power
Patchset 3 (id:??) landed as https://crrev.com/b76d5e11df4955210c8634da71836f31762186c9 Cr-Commit-Position: refs/heads/master@{#438475}
4 years ago (2016-12-14 09:56:57 UTC) #35
Wez
https://codereview.chromium.org/2556893003/diff/40001/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerContainer.cpp File third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerContainer.cpp (right): https://codereview.chromium.org/2556893003/diff/40001/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerContainer.cpp#newcode141 third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerContainer.cpp:141: if (m_navigator) Why check m_navigator here? It doesn't look ...
4 years ago (2016-12-15 17:57:43 UTC) #37
haraken
https://codereview.chromium.org/2556893003/diff/40001/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerContainer.cpp File third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerContainer.cpp (right): https://codereview.chromium.org/2556893003/diff/40001/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerContainer.cpp#newcode141 third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerContainer.cpp:141: if (m_navigator) On 2016/12/15 17:57:43, Wez wrote: > Why ...
4 years ago (2016-12-16 01:08:31 UTC) #38
Wez
4 years ago (2016-12-16 01:28:35 UTC) #39
Message was sent while issue was closed.
https://codereview.chromium.org/2556893003/diff/40001/third_party/WebKit/Sour...
File third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerContainer.cpp
(right):

https://codereview.chromium.org/2556893003/diff/40001/third_party/WebKit/Sour...
third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerContainer.cpp:141:
if (m_navigator)
On 2016/12/16 01:08:31, haraken wrote:
> On 2016/12/15 17:57:43, Wez wrote:
> > Why check m_navigator here? It doesn't look like it is valid for it to be
> > nullptr.
> 
> It happens only in testing. I can pass in a dummy Navigator if you prefer it.
> 

That would be my suggestion, since it leads to a simpler API contract (passing a
null Navigator is definitely an error), but this was a drive-by comment so feeel
free to ignore. :)

Powered by Google App Engine
This is Rietveld 408576698