|
|
Created:
4 years, 11 months ago by nhiroki Modified:
4 years, 11 months ago Reviewers:
falken CC:
chromium-reviews, michaeln, jsbell+serviceworker_chromium.org, tzik, serviceworker-reviews, jam, kinuko+serviceworker, darin-cc_chromium.org, horo+watch_chromium.org, kinuko+watch, blink-worker-reviews_chromium.org Base URL:
https://chromium.googlesource.com/chromium/src.git@master Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionServiceWorker: Make start worker sequence cancelable
Before this patch, there is no way to gracefully cancel the start sequence when
the worker is requested to stop. Therefore, both start and stop sequences can
be interleaved. To be more specific, process allocation information can be left
in ServiceWorkerProcessManager even after the start sequence is canceled, and
the process manager sometimes behaves strangely when attempting to restart the
worker. This patch provides a way to cancel the start sequence.
<Details of this patch>
Roughly speaking, the start sequence consists of two phases: (1) process
allocation involving thread hops, and (2) IPC messaging between the browser
process and a worker process. We need to make it cancelable in either phase.
To achieve that, this patch introduces...
* StartTask that is a cancelable task to allocate a worker process and to send
a start worker message.
* WorkerProcessHandle that is a handle for a worker process managed by
ServiceWorkerProcessManager. Its dtor makes sure to release a process.
The handle is created by StartTask when a process is allocated, and then
passed to EmbeddedWorkerInstance.
When the start sequence is aborted during the phase (1), StartTask releases a
process on its dtor. When the start sequence is aborted during the phase (2),
EmbeddedWorkerInstance releases the process by destroying the process handle.
BUG=568915, 568465
Committed: https://crrev.com/516d5df07faad532cae29db7d525c99ac6b3c691
Cr-Commit-Position: refs/heads/master@{#369387}
Patch Set 1 : #Patch Set 2 : fix test failures #Patch Set 3 : fix test failures #
Total comments: 8
Patch Set 4 : address review comments #
Messages
Total messages: 49 (39 generated)
Description was changed from ========== ServiceWorker: Always try to release worker process BUG=568915 ========== to ========== ServiceWorker: Make StartWorker job cancellable BUG=568915 ==========
Description was changed from ========== ServiceWorker: Make StartWorker job cancellable BUG=568915 ========== to ========== ServiceWorker: Make StartWorker job cancelable BUG=568915 ==========
Description was changed from ========== ServiceWorker: Make StartWorker job cancelable BUG=568915 ========== to ========== ServiceWorker: Make StartWorker job cancelable Before this patch, there was no way to gracefully abort the start sequence when the worker was requested to stop. Therefore, the both start and stop sequences could be interleaved. To make the start sequence cancelable, this CL introduces... * EmbeddedWorkerInstance::StartTask which is a cancelable task to allocate a worker process and to send a start worker message. * EmbeddedWorkerInstance::WorkerProcessHandle which is a handle for a worker process managed by ServiceWorkerProcessManager. Its destructor guarantees to release the process. The handle is created by StartTask when a process is allocated, and then passed to EmbeddedWorkerInstance. StartWorker sequence consists of 2 phases: (1) process allocation involving thread hops between the UI thread and the IO thread, (2) IPC messaging between the browser process and a worker process. When the start task is aborted during (1), the task gurantees to release a worker process (see the destructor of StartTask). When the start task is aborted during (2), EmbeddedWorkerInstance releases the process by resetting the process handle. BUG=568915 ==========
Description was changed from ========== ServiceWorker: Make StartWorker job cancelable Before this patch, there was no way to gracefully abort the start sequence when the worker was requested to stop. Therefore, the both start and stop sequences could be interleaved. To make the start sequence cancelable, this CL introduces... * EmbeddedWorkerInstance::StartTask which is a cancelable task to allocate a worker process and to send a start worker message. * EmbeddedWorkerInstance::WorkerProcessHandle which is a handle for a worker process managed by ServiceWorkerProcessManager. Its destructor guarantees to release the process. The handle is created by StartTask when a process is allocated, and then passed to EmbeddedWorkerInstance. StartWorker sequence consists of 2 phases: (1) process allocation involving thread hops between the UI thread and the IO thread, (2) IPC messaging between the browser process and a worker process. When the start task is aborted during (1), the task gurantees to release a worker process (see the destructor of StartTask). When the start task is aborted during (2), EmbeddedWorkerInstance releases the process by resetting the process handle. BUG=568915 ========== to ========== ServiceWorker: Make StartWorker job cancelable Before this patch, there was no way to gracefully abort the start sequence when the worker was requested to stop. Therefore, the both start and stop sequences could be interleaved. To make the start sequence cancelable, this CL introduces... * EmbeddedWorkerInstance::StartTask which is a cancelable task to allocate a worker process and to send a start worker message. * EmbeddedWorkerInstance::WorkerProcessHandle which is a handle for a worker process managed by ServiceWorkerProcessManager. Its destructor guarantees to release the process. The handle is created by StartTask when a process is allocated, and then passed to EmbeddedWorkerInstance. StartWorker sequence consists of 2 phases: (1) process allocation involving thread hops between the UI thread and the IO thread, (2) IPC messaging between the browser process and a worker process. When the start task is aborted during (1), the task gurantees to release a worker process (see the destructor of StartTask). When the start task is aborted during (2), EmbeddedWorkerInstance releases the process by resetting the process handle. BUG=568915 ==========
Description was changed from ========== ServiceWorker: Make StartWorker job cancelable Before this patch, there was no way to gracefully abort the start sequence when the worker was requested to stop. Therefore, the both start and stop sequences could be interleaved. To make the start sequence cancelable, this CL introduces... * EmbeddedWorkerInstance::StartTask which is a cancelable task to allocate a worker process and to send a start worker message. * EmbeddedWorkerInstance::WorkerProcessHandle which is a handle for a worker process managed by ServiceWorkerProcessManager. Its destructor guarantees to release the process. The handle is created by StartTask when a process is allocated, and then passed to EmbeddedWorkerInstance. StartWorker sequence consists of 2 phases: (1) process allocation involving thread hops between the UI thread and the IO thread, (2) IPC messaging between the browser process and a worker process. When the start task is aborted during (1), the task gurantees to release a worker process (see the destructor of StartTask). When the start task is aborted during (2), EmbeddedWorkerInstance releases the process by resetting the process handle. BUG=568915 ========== to ========== ServiceWorker: Make StartWorker job cancelable Before this patch, there was no way to gracefully abort the start sequence when the worker was requested to stop. Therefore, the both start and stop sequences could be interleaved. Specifically, we should release a worker process managed by ServiceWorkerProcessManager when the ongoing start task is canceled. To achieve that, this CL introduces... * StartTask that is a cancelable task to allocate a worker process and to send a start worker message. * WorkerProcessHandle that is a handle for a worker process managed by ServiceWorkerProcessManager. Its destructor guarantees to release the process. The handle is created by StartTask when a process is allocated, and then passed to EmbeddedWorkerInstance. StartWorker sequence consists of 2 phases: (1) process allocation involving thread hops between the UI thread and the IO thread, (2) IPC messaging between the browser process and a worker process. When the start task is aborted during (1), the task gurantees to release a worker process (see the destructor of StartTask). When the start task is aborted during (2), EmbeddedWorkerInstance releases the process by resetting the process handle. BUG=568915 ==========
Description was changed from ========== ServiceWorker: Make StartWorker job cancelable Before this patch, there was no way to gracefully abort the start sequence when the worker was requested to stop. Therefore, the both start and stop sequences could be interleaved. Specifically, we should release a worker process managed by ServiceWorkerProcessManager when the ongoing start task is canceled. To achieve that, this CL introduces... * StartTask that is a cancelable task to allocate a worker process and to send a start worker message. * WorkerProcessHandle that is a handle for a worker process managed by ServiceWorkerProcessManager. Its destructor guarantees to release the process. The handle is created by StartTask when a process is allocated, and then passed to EmbeddedWorkerInstance. StartWorker sequence consists of 2 phases: (1) process allocation involving thread hops between the UI thread and the IO thread, (2) IPC messaging between the browser process and a worker process. When the start task is aborted during (1), the task gurantees to release a worker process (see the destructor of StartTask). When the start task is aborted during (2), EmbeddedWorkerInstance releases the process by resetting the process handle. BUG=568915 ========== to ========== ServiceWorker: Make StartWorker sequence cancelable Before this patch, there was no way to gracefully cancel the start sequence when the worker was requested to stop. Therefore, the both start and stop sequences could be interleaved. To be more specific, process allocation information is still left in ServiceWorkerProcessManager even after the start sequence is canceled, and the process manager could behave strangely when attempting to restart the worker. StartWorker sequence consists of 2 phases: (1) process allocation involving thread hops between the UI thread and the IO thread, (2) IPC messaging between the browser process and a worker process. We need to make the start sequence cancelable even if the sequence is running in either phase. To achieve that, this CL introduces... * StartTask that is a cancelable task to allocate a worker process and to send a start worker message. * WorkerProcessHandle that is a handle for a worker process managed by ServiceWorkerProcessManager. Its destructor makes sure to release a process. The handle is created by StartTask when a process is allocated, and then passed to EmbeddedWorkerInstance. When the start task is aborted during the phase (1), the task releases a process on its destructor. When the start task is aborted during the phase (2), EmbeddedWorkerInstance releases the process by destroying the process handle. BUG=568915 ==========
Description was changed from ========== ServiceWorker: Make StartWorker sequence cancelable Before this patch, there was no way to gracefully cancel the start sequence when the worker was requested to stop. Therefore, the both start and stop sequences could be interleaved. To be more specific, process allocation information is still left in ServiceWorkerProcessManager even after the start sequence is canceled, and the process manager could behave strangely when attempting to restart the worker. StartWorker sequence consists of 2 phases: (1) process allocation involving thread hops between the UI thread and the IO thread, (2) IPC messaging between the browser process and a worker process. We need to make the start sequence cancelable even if the sequence is running in either phase. To achieve that, this CL introduces... * StartTask that is a cancelable task to allocate a worker process and to send a start worker message. * WorkerProcessHandle that is a handle for a worker process managed by ServiceWorkerProcessManager. Its destructor makes sure to release a process. The handle is created by StartTask when a process is allocated, and then passed to EmbeddedWorkerInstance. When the start task is aborted during the phase (1), the task releases a process on its destructor. When the start task is aborted during the phase (2), EmbeddedWorkerInstance releases the process by destroying the process handle. BUG=568915 ========== to ========== ServiceWorker: Make StartWorker sequence cancelable Before this patch, there was no way to gracefully cancel the start sequence when the worker was requested to stop. Therefore, the both start and stop sequences could be interleaved. To be more specific, process allocation information is still left in ServiceWorkerProcessManager even after the start sequence is canceled, and the process manager could behave strangely when attempting to restart the worker. StartWorker sequence consists of 2 phases: (1) process allocation involving thread hops between the UI thread and the IO thread, (2) IPC messaging between the browser process and a worker process. We need to make the start sequence cancelable even if the sequence is running in either phase. To achieve that, this CL introduces... * StartTask that is a cancelable task to allocate a worker process and to send a start worker message. * WorkerProcessHandle that is a handle for a worker process managed by ServiceWorkerProcessManager. Its destructor makes sure to release a process. The handle is created by StartTask when a process is allocated, and then passed to EmbeddedWorkerInstance. When the start task is aborted during the phase (1), the task releases a process on its destructor. When the start task is aborted during the phase (2), EmbeddedWorkerInstance releases the process by destroying the process handle. BUG=568915 ==========
Description was changed from ========== ServiceWorker: Make StartWorker sequence cancelable Before this patch, there was no way to gracefully cancel the start sequence when the worker was requested to stop. Therefore, the both start and stop sequences could be interleaved. To be more specific, process allocation information is still left in ServiceWorkerProcessManager even after the start sequence is canceled, and the process manager could behave strangely when attempting to restart the worker. StartWorker sequence consists of 2 phases: (1) process allocation involving thread hops between the UI thread and the IO thread, (2) IPC messaging between the browser process and a worker process. We need to make the start sequence cancelable even if the sequence is running in either phase. To achieve that, this CL introduces... * StartTask that is a cancelable task to allocate a worker process and to send a start worker message. * WorkerProcessHandle that is a handle for a worker process managed by ServiceWorkerProcessManager. Its destructor makes sure to release a process. The handle is created by StartTask when a process is allocated, and then passed to EmbeddedWorkerInstance. When the start task is aborted during the phase (1), the task releases a process on its destructor. When the start task is aborted during the phase (2), EmbeddedWorkerInstance releases the process by destroying the process handle. BUG=568915 ========== to ========== ServiceWorker: Make StartWorker sequence cancelable Before this patch, there was no way to gracefully cancel the start sequence when the worker was requested to stop. Therefore, the both start and stop sequences could be interleaved. To be more specific, process allocation information is still left in ServiceWorkerProcessManager even after the start sequence is canceled, and the process manager could behave strangely when attempting to restart the worker. The start sequence roughly consists of two phases: (1) process allocation involving thread hops, and (2) IPC messaging between the browser process and a worker process. We need to make it cancelable in either phase. To achieve that, this CL introduces... * StartTask that is a cancelable task to allocate a worker process and to send a start worker message. * WorkerProcessHandle that is a handle for a worker process managed by ServiceWorkerProcessManager. Its destructor makes sure to release a process. The handle is created by StartTask when a process is allocated, and then passed to EmbeddedWorkerInstance. When the start task is aborted during the phase (1), the task releases a process on its destructor. When the start task is aborted during the phase (2), EmbeddedWorkerInstance releases the process by destroying the process handle. BUG=568915 ==========
Patchset #1 (id:1) has been deleted
Patchset #1 (id:20001) has been deleted
Patchset #1 (id:40001) has been deleted
Patchset #1 (id:60001) has been deleted
Patchset #1 (id:80001) has been deleted
Patchset #1 (id:100001) has been deleted
Patchset #1 (id:120001) has been deleted
Patchset #1 (id:140001) has been deleted
Patchset #1 (id:160001) has been deleted
Patchset #1 (id:180001) has been deleted
Patchset #1 (id:200001) has been deleted
Patchset #1 (id:220001) has been deleted
Patchset #1 (id:240001) has been deleted
Patchset #1 (id:260001) has been deleted
Patchset #1 (id:280001) has been deleted
Description was changed from ========== ServiceWorker: Make StartWorker sequence cancelable Before this patch, there was no way to gracefully cancel the start sequence when the worker was requested to stop. Therefore, the both start and stop sequences could be interleaved. To be more specific, process allocation information is still left in ServiceWorkerProcessManager even after the start sequence is canceled, and the process manager could behave strangely when attempting to restart the worker. The start sequence roughly consists of two phases: (1) process allocation involving thread hops, and (2) IPC messaging between the browser process and a worker process. We need to make it cancelable in either phase. To achieve that, this CL introduces... * StartTask that is a cancelable task to allocate a worker process and to send a start worker message. * WorkerProcessHandle that is a handle for a worker process managed by ServiceWorkerProcessManager. Its destructor makes sure to release a process. The handle is created by StartTask when a process is allocated, and then passed to EmbeddedWorkerInstance. When the start task is aborted during the phase (1), the task releases a process on its destructor. When the start task is aborted during the phase (2), EmbeddedWorkerInstance releases the process by destroying the process handle. BUG=568915 ========== to ========== ServiceWorker: Make StartWorker sequence cancelable Before this patch, there is no way to gracefully cancel the start sequence when the worker is requested to stop. Therefore, both start and stop sequences can be interleaved. To be more specific, process allocation information can be left in ServiceWorkerProcessManager even after the start sequence is canceled, and the process manager sometimes behaves strangely when attempting to restart the worker. This patch provides a way to cancel the start sequence. <Details of this patch> Roughly speaking, the start sequence consists of two phases: (1) process allocation involving thread hops, and (2) IPC messaging between the browser process and a worker process. We need to make it cancelable in either phase. To achieve that, this patch introduces... * StartTask that is a cancelable task to allocate a worker process and to send a start worker message. * WorkerProcessHandle that is a handle for a worker process managed by ServiceWorkerProcessManager. Its destructor makes sure to release a process. The handle is created by StartTask when a process is allocated, and then passed to EmbeddedWorkerInstance. When the start task is aborted during the phase (1), the task releases a process on its destructor. When the start task is aborted during the phase (2), EmbeddedWorkerInstance releases the process by destroying the process handle. BUG=568915 ==========
Patchset #1 (id:300001) has been deleted
Patchset #1 (id:320001) has been deleted
nhiroki@chromium.org changed reviewers: + falken@chromium.org
Hi, can you review this? Thanks!
Hmm... this patch seems to change behavior of error cases. I'll investigate the cause of this...
On 2016/01/13 08:31:43, nhiroki wrote: > Hmm... this patch seems to change behavior of error cases. > I'll investigate the cause of this... Fixed. PTAL!
lgtm This is an awesome patch, it should fix the races and makes the code cleaner too. And the tests are nicely crafted. https://codereview.chromium.org/1569773002/diff/380001/content/browser/servic... File content/browser/service_worker/embedded_worker_instance.cc (right): https://codereview.chromium.org/1569773002/diff/380001/content/browser/servic... content/browser/service_worker/embedded_worker_instance.cc:171: // sequence. In the case, the destructor releases a worker process. "the case" -> "the case where process allocation was not completed"? Or maybe we dont' need that comment. https://codereview.chromium.org/1569773002/diff/380001/content/browser/servic... content/browser/service_worker/embedded_worker_instance.cc:172: class EmbeddedWorkerInstance::StartTask { This class is entirely in the IO thread right? Would it make sense to add DCHECK or use ThreadChecker? https://codereview.chromium.org/1569773002/diff/380001/content/browser/servic... File content/browser/service_worker/embedded_worker_instance_unittest.cc (right): https://codereview.chromium.org/1569773002/diff/380001/content/browser/servic... content/browser/service_worker/embedded_worker_instance_unittest.cc:123: // Do nothing to simulate a stall in the worker process. nit: The negatives and meaning of "default" are a bit confusing. How about just naming it something like |force_stall_in_start_|? https://codereview.chromium.org/1569773002/diff/380001/content/browser/servic... content/browser/service_worker/embedded_worker_instance_unittest.cc:416: helper_.reset(helper_ptr); Is there a reason to introduce the helper_ptr variable instead of just using helper_ when you want the ptr?
Description was changed from ========== ServiceWorker: Make StartWorker sequence cancelable Before this patch, there is no way to gracefully cancel the start sequence when the worker is requested to stop. Therefore, both start and stop sequences can be interleaved. To be more specific, process allocation information can be left in ServiceWorkerProcessManager even after the start sequence is canceled, and the process manager sometimes behaves strangely when attempting to restart the worker. This patch provides a way to cancel the start sequence. <Details of this patch> Roughly speaking, the start sequence consists of two phases: (1) process allocation involving thread hops, and (2) IPC messaging between the browser process and a worker process. We need to make it cancelable in either phase. To achieve that, this patch introduces... * StartTask that is a cancelable task to allocate a worker process and to send a start worker message. * WorkerProcessHandle that is a handle for a worker process managed by ServiceWorkerProcessManager. Its destructor makes sure to release a process. The handle is created by StartTask when a process is allocated, and then passed to EmbeddedWorkerInstance. When the start task is aborted during the phase (1), the task releases a process on its destructor. When the start task is aborted during the phase (2), EmbeddedWorkerInstance releases the process by destroying the process handle. BUG=568915 ========== to ========== ServiceWorker: Make StartWorker sequence cancelable Before this patch, there is no way to gracefully cancel the start sequence when the worker is requested to stop. Therefore, both start and stop sequences can be interleaved. To be more specific, process allocation information can be left in ServiceWorkerProcessManager even after the start sequence is canceled, and the process manager sometimes behaves strangely when attempting to restart the worker. This patch provides a way to cancel the start sequence. <Details of this patch> Roughly speaking, the start sequence consists of two phases: (1) process allocation involving thread hops, and (2) IPC messaging between the browser process and a worker process. We need to make it cancelable in either phase. To achieve that, this patch introduces... * StartTask that is a cancelable task to allocate a worker process and to send a start worker message. * WorkerProcessHandle that is a handle for a worker process managed by ServiceWorkerProcessManager. Its destructor makes sure to release a process. The handle is created by StartTask when a process is allocated, and then passed to EmbeddedWorkerInstance. When the start task is aborted during the phase (1), the task releases a process on its destructor. When the start task is aborted during the phase (2), EmbeddedWorkerInstance releases the process by destroying the process handle. BUG=568915,568465 ==========
Thank you for reviewing! https://codereview.chromium.org/1569773002/diff/380001/content/browser/servic... File content/browser/service_worker/embedded_worker_instance.cc (right): https://codereview.chromium.org/1569773002/diff/380001/content/browser/servic... content/browser/service_worker/embedded_worker_instance.cc:171: // sequence. In the case, the destructor releases a worker process. On 2016/01/14 07:30:00, falken wrote: > "the case" -> "the case where process allocation was not completed"? Or maybe we > dont' need that comment. Done. https://codereview.chromium.org/1569773002/diff/380001/content/browser/servic... content/browser/service_worker/embedded_worker_instance.cc:172: class EmbeddedWorkerInstance::StartTask { On 2016/01/14 07:30:00, falken wrote: > This class is entirely in the IO thread right? Would it make sense to add DCHECK > or use ThreadChecker? Done. https://codereview.chromium.org/1569773002/diff/380001/content/browser/servic... File content/browser/service_worker/embedded_worker_instance_unittest.cc (right): https://codereview.chromium.org/1569773002/diff/380001/content/browser/servic... content/browser/service_worker/embedded_worker_instance_unittest.cc:123: // Do nothing to simulate a stall in the worker process. On 2016/01/14 07:30:00, falken wrote: > nit: The negatives and meaning of "default" are a bit confusing. How about just > naming it something like |force_stall_in_start_|? Done. https://codereview.chromium.org/1569773002/diff/380001/content/browser/servic... content/browser/service_worker/embedded_worker_instance_unittest.cc:416: helper_.reset(helper_ptr); On 2016/01/14 07:30:00, falken wrote: > Is there a reason to introduce the helper_ptr variable instead of just using > helper_ when you want the ptr? "helper_" is not StalledInStartWorkerHelper but EmbeddedWorkerTestHelper, so we need to keep a rawptr or do static_cast for calling set_use_default_behavior() at line 450. I switched this from the rawptr way to the static_cast way because it would make my intention clearer.
Description was changed from ========== ServiceWorker: Make StartWorker sequence cancelable Before this patch, there is no way to gracefully cancel the start sequence when the worker is requested to stop. Therefore, both start and stop sequences can be interleaved. To be more specific, process allocation information can be left in ServiceWorkerProcessManager even after the start sequence is canceled, and the process manager sometimes behaves strangely when attempting to restart the worker. This patch provides a way to cancel the start sequence. <Details of this patch> Roughly speaking, the start sequence consists of two phases: (1) process allocation involving thread hops, and (2) IPC messaging between the browser process and a worker process. We need to make it cancelable in either phase. To achieve that, this patch introduces... * StartTask that is a cancelable task to allocate a worker process and to send a start worker message. * WorkerProcessHandle that is a handle for a worker process managed by ServiceWorkerProcessManager. Its destructor makes sure to release a process. The handle is created by StartTask when a process is allocated, and then passed to EmbeddedWorkerInstance. When the start task is aborted during the phase (1), the task releases a process on its destructor. When the start task is aborted during the phase (2), EmbeddedWorkerInstance releases the process by destroying the process handle. BUG=568915,568465 ========== to ========== ServiceWorker: Make StartWorker sequence cancelable Before this patch, there is no way to gracefully cancel the start sequence when the worker is requested to stop. Therefore, both start and stop sequences can be interleaved. To be more specific, process allocation information can be left in ServiceWorkerProcessManager even after the start sequence is canceled, and the process manager sometimes behaves strangely when attempting to restart the worker. This patch provides a way to cancel the start sequence. <Details of this patch> Roughly speaking, the start sequence consists of two phases: (1) process allocation involving thread hops, and (2) IPC messaging between the browser process and a worker process. We need to make it cancelable in either phase. To achieve that, this patch introduces... * StartTask that is a cancelable task to allocate a worker process and to send a start worker message. * WorkerProcessHandle that is a handle for a worker process managed by ServiceWorkerProcessManager. Its dtor makes sure to release a process. The handle is created by StartTask when a process is allocated, and then passed to EmbeddedWorkerInstance. When the start sequence is aborted during the phase (1), the task releases a process on its dtor. When the start sequence is aborted during the phase (2), EmbeddedWorkerInstance releases the process by destroying the process handle. BUG=568915,568465 ==========
The CQ bit was checked by nhiroki@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from falken@chromium.org Link to the patchset: https://codereview.chromium.org/1569773002/#ps400001 (title: "address review comments")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1569773002/400001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1569773002/400001
The CQ bit was unchecked by nhiroki@chromium.org
Description was changed from ========== ServiceWorker: Make StartWorker sequence cancelable Before this patch, there is no way to gracefully cancel the start sequence when the worker is requested to stop. Therefore, both start and stop sequences can be interleaved. To be more specific, process allocation information can be left in ServiceWorkerProcessManager even after the start sequence is canceled, and the process manager sometimes behaves strangely when attempting to restart the worker. This patch provides a way to cancel the start sequence. <Details of this patch> Roughly speaking, the start sequence consists of two phases: (1) process allocation involving thread hops, and (2) IPC messaging between the browser process and a worker process. We need to make it cancelable in either phase. To achieve that, this patch introduces... * StartTask that is a cancelable task to allocate a worker process and to send a start worker message. * WorkerProcessHandle that is a handle for a worker process managed by ServiceWorkerProcessManager. Its dtor makes sure to release a process. The handle is created by StartTask when a process is allocated, and then passed to EmbeddedWorkerInstance. When the start sequence is aborted during the phase (1), the task releases a process on its dtor. When the start sequence is aborted during the phase (2), EmbeddedWorkerInstance releases the process by destroying the process handle. BUG=568915,568465 ========== to ========== ServiceWorker: Make StartWorker sequence cancelable Before this patch, there is no way to gracefully cancel the start sequence when the worker is requested to stop. Therefore, both start and stop sequences can be interleaved. To be more specific, process allocation information can be left in ServiceWorkerProcessManager even after the start sequence is canceled, and the process manager sometimes behaves strangely when attempting to restart the worker. This patch provides a way to cancel the start sequence. <Details of this patch> Roughly speaking, the start sequence consists of two phases: (1) process allocation involving thread hops, and (2) IPC messaging between the browser process and a worker process. We need to make it cancelable in either phase. To achieve that, this patch introduces... * StartTask that is a cancelable task to allocate a worker process and to send a start worker message. * WorkerProcessHandle that is a handle for a worker process managed by ServiceWorkerProcessManager. Its dtor makes sure to release a process. The handle is created by StartTask when a process is allocated, and then passed to EmbeddedWorkerInstance. When the start sequence is aborted during the phase (1), StartTask releases a process on its dtor. When the start sequence is aborted during the phase (2), EmbeddedWorkerInstance releases the process by destroying the process handle. BUG=568915,568465 ==========
The CQ bit was checked by nhiroki@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1569773002/400001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1569773002/400001
The CQ bit was unchecked by nhiroki@chromium.org
Description was changed from ========== ServiceWorker: Make StartWorker sequence cancelable Before this patch, there is no way to gracefully cancel the start sequence when the worker is requested to stop. Therefore, both start and stop sequences can be interleaved. To be more specific, process allocation information can be left in ServiceWorkerProcessManager even after the start sequence is canceled, and the process manager sometimes behaves strangely when attempting to restart the worker. This patch provides a way to cancel the start sequence. <Details of this patch> Roughly speaking, the start sequence consists of two phases: (1) process allocation involving thread hops, and (2) IPC messaging between the browser process and a worker process. We need to make it cancelable in either phase. To achieve that, this patch introduces... * StartTask that is a cancelable task to allocate a worker process and to send a start worker message. * WorkerProcessHandle that is a handle for a worker process managed by ServiceWorkerProcessManager. Its dtor makes sure to release a process. The handle is created by StartTask when a process is allocated, and then passed to EmbeddedWorkerInstance. When the start sequence is aborted during the phase (1), StartTask releases a process on its dtor. When the start sequence is aborted during the phase (2), EmbeddedWorkerInstance releases the process by destroying the process handle. BUG=568915,568465 ========== to ========== ServiceWorker: Make start worker sequence cancelable Before this patch, there is no way to gracefully cancel the start sequence when the worker is requested to stop. Therefore, both start and stop sequences can be interleaved. To be more specific, process allocation information can be left in ServiceWorkerProcessManager even after the start sequence is canceled, and the process manager sometimes behaves strangely when attempting to restart the worker. This patch provides a way to cancel the start sequence. <Details of this patch> Roughly speaking, the start sequence consists of two phases: (1) process allocation involving thread hops, and (2) IPC messaging between the browser process and a worker process. We need to make it cancelable in either phase. To achieve that, this patch introduces... * StartTask that is a cancelable task to allocate a worker process and to send a start worker message. * WorkerProcessHandle that is a handle for a worker process managed by ServiceWorkerProcessManager. Its dtor makes sure to release a process. The handle is created by StartTask when a process is allocated, and then passed to EmbeddedWorkerInstance. When the start sequence is aborted during the phase (1), StartTask releases a process on its dtor. When the start sequence is aborted during the phase (2), EmbeddedWorkerInstance releases the process by destroying the process handle. BUG=568915,568465 ==========
The CQ bit was checked by nhiroki@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1569773002/400001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1569773002/400001
Message was sent while issue was closed.
Description was changed from ========== ServiceWorker: Make start worker sequence cancelable Before this patch, there is no way to gracefully cancel the start sequence when the worker is requested to stop. Therefore, both start and stop sequences can be interleaved. To be more specific, process allocation information can be left in ServiceWorkerProcessManager even after the start sequence is canceled, and the process manager sometimes behaves strangely when attempting to restart the worker. This patch provides a way to cancel the start sequence. <Details of this patch> Roughly speaking, the start sequence consists of two phases: (1) process allocation involving thread hops, and (2) IPC messaging between the browser process and a worker process. We need to make it cancelable in either phase. To achieve that, this patch introduces... * StartTask that is a cancelable task to allocate a worker process and to send a start worker message. * WorkerProcessHandle that is a handle for a worker process managed by ServiceWorkerProcessManager. Its dtor makes sure to release a process. The handle is created by StartTask when a process is allocated, and then passed to EmbeddedWorkerInstance. When the start sequence is aborted during the phase (1), StartTask releases a process on its dtor. When the start sequence is aborted during the phase (2), EmbeddedWorkerInstance releases the process by destroying the process handle. BUG=568915,568465 ========== to ========== ServiceWorker: Make start worker sequence cancelable Before this patch, there is no way to gracefully cancel the start sequence when the worker is requested to stop. Therefore, both start and stop sequences can be interleaved. To be more specific, process allocation information can be left in ServiceWorkerProcessManager even after the start sequence is canceled, and the process manager sometimes behaves strangely when attempting to restart the worker. This patch provides a way to cancel the start sequence. <Details of this patch> Roughly speaking, the start sequence consists of two phases: (1) process allocation involving thread hops, and (2) IPC messaging between the browser process and a worker process. We need to make it cancelable in either phase. To achieve that, this patch introduces... * StartTask that is a cancelable task to allocate a worker process and to send a start worker message. * WorkerProcessHandle that is a handle for a worker process managed by ServiceWorkerProcessManager. Its dtor makes sure to release a process. The handle is created by StartTask when a process is allocated, and then passed to EmbeddedWorkerInstance. When the start sequence is aborted during the phase (1), StartTask releases a process on its dtor. When the start sequence is aborted during the phase (2), EmbeddedWorkerInstance releases the process by destroying the process handle. BUG=568915,568465 ==========
Message was sent while issue was closed.
Committed patchset #4 (id:400001)
Message was sent while issue was closed.
Description was changed from ========== ServiceWorker: Make start worker sequence cancelable Before this patch, there is no way to gracefully cancel the start sequence when the worker is requested to stop. Therefore, both start and stop sequences can be interleaved. To be more specific, process allocation information can be left in ServiceWorkerProcessManager even after the start sequence is canceled, and the process manager sometimes behaves strangely when attempting to restart the worker. This patch provides a way to cancel the start sequence. <Details of this patch> Roughly speaking, the start sequence consists of two phases: (1) process allocation involving thread hops, and (2) IPC messaging between the browser process and a worker process. We need to make it cancelable in either phase. To achieve that, this patch introduces... * StartTask that is a cancelable task to allocate a worker process and to send a start worker message. * WorkerProcessHandle that is a handle for a worker process managed by ServiceWorkerProcessManager. Its dtor makes sure to release a process. The handle is created by StartTask when a process is allocated, and then passed to EmbeddedWorkerInstance. When the start sequence is aborted during the phase (1), StartTask releases a process on its dtor. When the start sequence is aborted during the phase (2), EmbeddedWorkerInstance releases the process by destroying the process handle. BUG=568915,568465 ========== to ========== ServiceWorker: Make start worker sequence cancelable Before this patch, there is no way to gracefully cancel the start sequence when the worker is requested to stop. Therefore, both start and stop sequences can be interleaved. To be more specific, process allocation information can be left in ServiceWorkerProcessManager even after the start sequence is canceled, and the process manager sometimes behaves strangely when attempting to restart the worker. This patch provides a way to cancel the start sequence. <Details of this patch> Roughly speaking, the start sequence consists of two phases: (1) process allocation involving thread hops, and (2) IPC messaging between the browser process and a worker process. We need to make it cancelable in either phase. To achieve that, this patch introduces... * StartTask that is a cancelable task to allocate a worker process and to send a start worker message. * WorkerProcessHandle that is a handle for a worker process managed by ServiceWorkerProcessManager. Its dtor makes sure to release a process. The handle is created by StartTask when a process is allocated, and then passed to EmbeddedWorkerInstance. When the start sequence is aborted during the phase (1), StartTask releases a process on its dtor. When the start sequence is aborted during the phase (2), EmbeddedWorkerInstance releases the process by destroying the process handle. BUG=568915,568465 Committed: https://crrev.com/516d5df07faad532cae29db7d525c99ac6b3c691 Cr-Commit-Position: refs/heads/master@{#369387} ==========
Message was sent while issue was closed.
Patchset 4 (id:??) landed as https://crrev.com/516d5df07faad532cae29db7d525c99ac6b3c691 Cr-Commit-Position: refs/heads/master@{#369387} |