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

Issue 825383004: ServiceWorker: Send state change events via SWProviderHost (Closed)

Created:
5 years, 11 months ago by nhiroki
Modified:
5 years, 11 months ago
Reviewers:
falken, kinuko
CC:
chromium-reviews, michaeln, jsbell+serviceworker_chromium.org, tzik, serviceworker-reviews, jam, kinuko+serviceworker, darin-cc_chromium.org, horo+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

ServiceWorker: Send state change events via SWProviderHost This CL refactors relationship among SW(Registration)Handle, SWProviderHost and SWDispatcherHost. Before this CL, the handle directly asks SWDispatcherHost to send an IPC message when it receives an state change notification. After this CL, the handle retains a weakptr to SWProviderHost and asks it to send the message. This change enables that... - the handles don't have to take care of receiver's thread id anymore. It's managed by SWProviderHost instead. (Currently the thread id is hard-coded as kDocumentMainThreadId, but I'll make it injectable in a subsequent CL.) - IPC messages could be queued up when the receiver's thread hasn't been ready to receive the messages. This would be useful when we support the worker thread as a receiver's thread. BUG=437677 TEST=content_unittests --gtest_filter=ServiceWorker* TEST=run-webkit-tests http/tests/serviceworker/ Committed: https://crrev.com/084b4564fc3f39352e9c394fd803a9fb248e2efb Cr-Commit-Position: refs/heads/master@{#312592}

Patch Set 1 : #

Total comments: 4

Patch Set 2 : remove unnecessary error handling #

Total comments: 2

Patch Set 3 : update header comment #

Patch Set 4 : rebase #

Messages

Total messages: 24 (9 generated)
nhiroki
Hi, can you review this? I'd like to use this change in my separate CL[1] ...
5 years, 11 months ago (2015-01-20 06:37:16 UTC) #8
falken
Quick comment, is the design doc up-to-date: https://docs.google.com/document/d/1qDGbMlwKOXxCRBlw9IirK8Qmna3JqvnO3Aogkfu9UJQ/edit#heading=h.rxi15iaw9pmq Where does this CL fit into the ...
5 years, 11 months ago (2015-01-21 04:59:29 UTC) #9
nhiroki
On 2015/01/21 04:59:29, falken wrote: > Quick comment, is the design doc up-to-date: > https://docs.google.com/document/d/1qDGbMlwKOXxCRBlw9IirK8Qmna3JqvnO3Aogkfu9UJQ/edit#heading=h.rxi15iaw9pmq ...
5 years, 11 months ago (2015-01-21 06:42:42 UTC) #10
kinuko
(Sorry for slow review) I agree that having a separate queue is ok (will need ...
5 years, 11 months ago (2015-01-21 06:47:30 UTC) #11
kinuko
> asynchronous promise resolution with micro tasks, which is not in the browser > process. ...
5 years, 11 months ago (2015-01-21 06:48:23 UTC) #12
nhiroki
On 2015/01/21 06:42:42, nhiroki wrote: > On 2015/01/21 04:59:29, falken wrote: > > Quick comment, ...
5 years, 11 months ago (2015-01-21 07:39:17 UTC) #13
kinuko
I think this is looking good. https://codereview.chromium.org/825383004/diff/120001/content/browser/service_worker/service_worker_dispatcher_host.cc File content/browser/service_worker/service_worker_dispatcher_host.cc (right): https://codereview.chromium.org/825383004/diff/120001/content/browser/service_worker/service_worker_dispatcher_host.cc#newcode612 content/browser/service_worker/service_worker_dispatcher_host.cc:612: base::ASCIIToUTF16(kShutdownErrorMessage))); Why do ...
5 years, 11 months ago (2015-01-21 10:11:00 UTC) #14
nhiroki
Thank you for reviewing. Comment reply only. https://codereview.chromium.org/825383004/diff/120001/content/browser/service_worker/service_worker_dispatcher_host.cc File content/browser/service_worker/service_worker_dispatcher_host.cc (right): https://codereview.chromium.org/825383004/diff/120001/content/browser/service_worker/service_worker_dispatcher_host.cc#newcode612 content/browser/service_worker/service_worker_dispatcher_host.cc:612: base::ASCIIToUTF16(kShutdownErrorMessage))); On ...
5 years, 11 months ago (2015-01-22 03:34:15 UTC) #16
nhiroki
https://codereview.chromium.org/825383004/diff/120001/content/browser/service_worker/service_worker_dispatcher_host.cc File content/browser/service_worker/service_worker_dispatcher_host.cc (right): https://codereview.chromium.org/825383004/diff/120001/content/browser/service_worker/service_worker_dispatcher_host.cc#newcode612 content/browser/service_worker/service_worker_dispatcher_host.cc:612: base::ASCIIToUTF16(kShutdownErrorMessage))); On 2015/01/22 03:34:14, nhiroki wrote: > On 2015/01/21 ...
5 years, 11 months ago (2015-01-22 04:12:51 UTC) #17
nhiroki
Removed the unnecessary error handling. Can you take another look? https://codereview.chromium.org/825383004/diff/120001/content/browser/service_worker/service_worker_dispatcher_host.cc File content/browser/service_worker/service_worker_dispatcher_host.cc (right): https://codereview.chromium.org/825383004/diff/120001/content/browser/service_worker/service_worker_dispatcher_host.cc#newcode612 ...
5 years, 11 months ago (2015-01-22 04:33:43 UTC) #18
kinuko
lgtm https://codereview.chromium.org/825383004/diff/160001/content/browser/service_worker/service_worker_provider_host.h File content/browser/service_worker/service_worker_provider_host.h (right): https://codereview.chromium.org/825383004/diff/160001/content/browser/service_worker/service_worker_provider_host.h#newcode121 content/browser/service_worker/service_worker_provider_host.h:121: // OnDecrementServiceWorkerRefCount. nit: 'via OnDecrementServiceWorkerRefCount' part could be ...
5 years, 11 months ago (2015-01-22 06:30:52 UTC) #19
nhiroki
https://codereview.chromium.org/825383004/diff/160001/content/browser/service_worker/service_worker_provider_host.h File content/browser/service_worker/service_worker_provider_host.h (right): https://codereview.chromium.org/825383004/diff/160001/content/browser/service_worker/service_worker_provider_host.h#newcode121 content/browser/service_worker/service_worker_provider_host.h:121: // OnDecrementServiceWorkerRefCount. On 2015/01/22 06:30:52, kinuko wrote: > nit: ...
5 years, 11 months ago (2015-01-22 07:05:59 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/825383004/200001
5 years, 11 months ago (2015-01-22 08:09:17 UTC) #22
commit-bot: I haz the power
Committed patchset #4 (id:200001)
5 years, 11 months ago (2015-01-22 08:59:59 UTC) #23
commit-bot: I haz the power
5 years, 11 months ago (2015-01-22 09:01:49 UTC) #24
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/084b4564fc3f39352e9c394fd803a9fb248e2efb
Cr-Commit-Position: refs/heads/master@{#312592}

Powered by Google App Engine
This is Rietveld 408576698