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

Issue 261533003: Populate .current when navigator.serviceWorker is accessed (Closed)

Created:
6 years, 7 months ago by kinuko
Modified:
6 years, 7 months ago
CC:
chromium-reviews, michaeln, jsbell+serviceworker_chromium.org, nasko+codewatch_chromium.org, creis+watch_chromium.org, tzik, serviceworker-reviews, jam, nhiroki, darin-cc_chromium.org, horo+watch_chromium.org, kinuko+watch, alecflett+watch_chromium.org
Visibility:
Public.

Description

Populate .current right after navigator.serviceWorker is accessed - Remove AddScriptClient/RemoveScriptClient messsaging - SetCurrent, StateChanged messages are always sent to the document thread - Changed ObjectDestroyed message to {Increment,Decrement}RefCount - Multiple providers for the same document could share one SWProviderContext (new class) - SWProviderContext is: -- responsible for keeping refcount for .current etc (while no script provider's available -- responsible for updating .current info for newer provider initialization -- responsible for forwarding .current related messages to worker providers --> DROPPED BUG=366538 TEST=to be added later (https://codereview.chromium.org/265943003/) R=falken@chromium.org, jochen@chromium.org, michaeln@chromium.org, tsepez@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=269102

Patch Set 1 : #

Total comments: 22

Patch Set 2 : addressed comments, plausible version w/ dedicated worker support #

Patch Set 3 : dropped dedicated worker support #

Total comments: 8

Patch Set 4 : addressed comments #

Patch Set 5 : fixed test crashes #

Patch Set 6 : rebased #

Patch Set 7 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+447 lines, -138 lines) Patch
M content/browser/service_worker/service_worker_dispatcher_host.h View 1 2 3 4 5 2 chunks +2 lines, -3 lines 0 comments Download
M content/browser/service_worker/service_worker_dispatcher_host.cc View 1 2 3 4 5 4 chunks +23 lines, -30 lines 0 comments Download
M content/browser/service_worker/service_worker_handle.h View 1 chunk +5 lines, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_handle.cc View 2 chunks +11 lines, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_provider_host.h View 3 chunks +0 lines, -10 lines 0 comments Download
M content/browser/service_worker/service_worker_provider_host.cc View 4 chunks +13 lines, -27 lines 0 comments Download
M content/child/service_worker/service_worker_dispatcher.h View 1 4 chunks +17 lines, -2 lines 0 comments Download
M content/child/service_worker/service_worker_dispatcher.cc View 1 2 3 4 chunks +39 lines, -26 lines 0 comments Download
A content/child/service_worker/service_worker_handle_reference.h View 1 2 3 1 chunk +49 lines, -0 lines 0 comments Download
A content/child/service_worker/service_worker_handle_reference.cc View 1 1 chunk +50 lines, -0 lines 0 comments Download
M content/child/service_worker/service_worker_message_filter.cc View 1 chunk +1 line, -1 line 0 comments Download
M content/child/service_worker/service_worker_network_provider.h View 3 chunks +5 lines, -0 lines 0 comments Download
M content/child/service_worker/service_worker_network_provider.cc View 2 chunks +3 lines, -1 line 0 comments Download
A content/child/service_worker/service_worker_provider_context.h View 1 2 3 1 chunk +66 lines, -0 lines 0 comments Download
A content/child/service_worker/service_worker_provider_context.cc View 1 2 3 4 5 6 1 chunk +78 lines, -0 lines 0 comments Download
M content/child/service_worker/web_service_worker_impl.h View 1 2 3 2 chunks +13 lines, -4 lines 0 comments Download
M content/child/service_worker/web_service_worker_impl.cc View 1 4 chunks +24 lines, -12 lines 0 comments Download
M content/child/service_worker/web_service_worker_provider_impl.h View 1 2 2 chunks +7 lines, -1 line 0 comments Download
M content/child/service_worker/web_service_worker_provider_impl.cc View 1 2 3 3 chunks +29 lines, -5 lines 0 comments Download
M content/common/service_worker/service_worker_messages.h View 2 chunks +6 lines, -12 lines 0 comments Download
M content/content_child.gypi View 1 1 chunk +4 lines, -0 lines 0 comments Download
M content/renderer/render_frame_impl.cc View 1 2 3 4 5 1 chunk +2 lines, -4 lines 0 comments Download

Messages

Total messages: 39 (0 generated)
kinuko
Not very cute, but works. There're a few points I'm still not satisfied, but it's ...
6 years, 7 months ago (2014-04-30 15:16:36 UTC) #1
kinuko
On 2014/04/30 15:16:36, kinuko wrote: > Not very cute, but works. There're a few points ...
6 years, 7 months ago (2014-04-30 15:26:30 UTC) #2
michaeln
i think this is closer to how it will look in the end, its still ...
6 years, 7 months ago (2014-05-01 01:25:17 UTC) #3
falken
I also tried diagramming this all out, but I don't quite understand fully. https://codereview.chromium.org/261533003/diff/80001/content/child/service_worker/service_worker_dispatcher.cc File ...
6 years, 7 months ago (2014-05-01 12:19:28 UTC) #4
kinuko
Updated, I think this is a plausible fix... but I also agree that probably we ...
6 years, 7 months ago (2014-05-02 10:00:55 UTC) #5
kinuko
Dropped threading, message forwarding and lock parts to disregard dedicated-worker cases for now. (I can ...
6 years, 7 months ago (2014-05-02 12:18:19 UTC) #6
michaeln
lgtm thnx for simplifying, i think this is still evolving and what you have here ...
6 years, 7 months ago (2014-05-05 23:18:03 UTC) #7
falken
lgtm2 https://codereview.chromium.org/261533003/diff/120001/content/child/service_worker/service_worker_handle_reference.h File content/child/service_worker/service_worker_handle_reference.h (right): https://codereview.chromium.org/261533003/diff/120001/content/child/service_worker/service_worker_handle_reference.h#newcode16 content/child/service_worker/service_worker_handle_reference.h:16: // Automatically increments and decrement ServiceWorkerHandle's ref-count nit: ...
6 years, 7 months ago (2014-05-06 00:16:23 UTC) #8
kinuko
Thx for reviewing, updated. https://codereview.chromium.org/261533003/diff/120001/content/child/service_worker/service_worker_handle_reference.h File content/child/service_worker/service_worker_handle_reference.h (right): https://codereview.chromium.org/261533003/diff/120001/content/child/service_worker/service_worker_handle_reference.h#newcode16 content/child/service_worker/service_worker_handle_reference.h:16: // Automatically increments and decrement ...
6 years, 7 months ago (2014-05-06 00:39:36 UTC) #9
kinuko
Tom, can you review service_worker_messages.h?
6 years, 7 months ago (2014-05-06 00:40:35 UTC) #10
kinuko
On 2014/05/06 00:40:35, kinuko wrote: > Tom, can you review service_worker_messages.h? Jochen, can you do ...
6 years, 7 months ago (2014-05-06 06:35:16 UTC) #11
jochen (gone - plz use gerrit)
lgtm
6 years, 7 months ago (2014-05-06 11:55:33 UTC) #12
Tom Sepez
What's the worst that could happen in the browser process if the SW lies about ...
6 years, 7 months ago (2014-05-06 17:36:15 UTC) #13
kinuko
On 2014/05/06 17:36:15, Tom Sepez wrote: > What's the worst that could happen in the ...
6 years, 7 months ago (2014-05-07 00:26:30 UTC) #14
Tom Sepez
lgtm
6 years, 7 months ago (2014-05-07 16:56:46 UTC) #15
kinuko
The CQ bit was checked by kinuko@chromium.org
6 years, 7 months ago (2014-05-07 16:59:51 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kinuko@chromium.org/261533003/160001
6 years, 7 months ago (2014-05-07 17:03:23 UTC) #17
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). Please consider checking whether the failures are ...
6 years, 7 months ago (2014-05-07 19:59:12 UTC) #18
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). Please consider checking whether the failures are ...
6 years, 7 months ago (2014-05-07 20:41:34 UTC) #19
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #2). Please consider checking whether the failures are ...
6 years, 7 months ago (2014-05-07 21:13:40 UTC) #20
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 7 months ago (2014-05-07 21:19:22 UTC) #21
commit-bot: I haz the power
Try jobs failed on following builders: android_chromium_gn_compile_rel on tryserver.chromium linux_chromium_gn_rel on tryserver.chromium
6 years, 7 months ago (2014-05-07 21:19:23 UTC) #22
kinuko
The CQ bit was checked by kinuko@chromium.org
6 years, 7 months ago (2014-05-08 00:04:54 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kinuko@chromium.org/261533003/160001
6 years, 7 months ago (2014-05-08 00:07:46 UTC) #24
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). Please consider checking whether the failures are ...
6 years, 7 months ago (2014-05-08 00:17:48 UTC) #25
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #2). Please consider checking whether the failures are ...
6 years, 7 months ago (2014-05-08 00:53:33 UTC) #26
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 7 months ago (2014-05-08 00:58:36 UTC) #27
commit-bot: I haz the power
Try jobs failed on following builders: android_chromium_gn_compile_rel on tryserver.chromium android_dbg_triggered_tests on tryserver.chromium linux_chromium_gn_rel on tryserver.chromium
6 years, 7 months ago (2014-05-08 00:58:36 UTC) #28
kinuko
The CQ bit was checked by kinuko@chromium.org
6 years, 7 months ago (2014-05-08 01:23:14 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kinuko@chromium.org/261533003/180001
6 years, 7 months ago (2014-05-08 01:26:59 UTC) #30
kinuko
The CQ bit was unchecked by kinuko@chromium.org
6 years, 7 months ago (2014-05-08 02:25:42 UTC) #31
kinuko
The CQ bit was checked by kinuko@chromium.org
6 years, 7 months ago (2014-05-08 02:35:59 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kinuko@chromium.org/261533003/200001
6 years, 7 months ago (2014-05-08 02:38:54 UTC) #33
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). Please consider checking whether the failures are ...
6 years, 7 months ago (2014-05-08 07:31:13 UTC) #34
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 7 months ago (2014-05-08 08:51:06 UTC) #35
commit-bot: I haz the power
Try jobs failed on following builders: android_dbg_triggered_tests on tryserver.chromium
6 years, 7 months ago (2014-05-08 08:51:07 UTC) #36
kinuko
The CQ bit was checked by kinuko@chromium.org
6 years, 7 months ago (2014-05-08 08:56:33 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kinuko@chromium.org/261533003/200001
6 years, 7 months ago (2014-05-08 08:58:28 UTC) #38
kinuko
6 years, 7 months ago (2014-05-08 23:48:20 UTC) #39
Message was sent while issue was closed.
Committed patchset #7 manually as r269102 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698