|
|
Created:
4 years, 7 months ago by nhiroki Modified:
4 years, 7 months ago CC:
chromium-reviews, blink-reviews, kinuko+worker_chromium.org, falken, blink-worker-reviews_chromium.org, horo+watch_chromium.org Base URL:
https://chromium.googlesource.com/chromium/src.git@reorder_functions Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionWorker: Stop calling Isolate::TerminateExecution() on a worker thread
When we need to stop further worker script execution from the worker thread,
we should call WorkerThread::prepareForShutdownOnWorkerThread() that provides
more graceful shutdown sequence than Isolate::TerminateExecution().
BUG=487050
Committed: https://crrev.com/4a47d3b7f8bc3204f79d343711bd9578c411d480
Cr-Commit-Position: refs/heads/master@{#396212}
Patch Set 1 : #
Total comments: 4
Patch Set 2 : Move prepareForShutdownOnWorkerThread() call to out of a critical section #
Total comments: 2
Patch Set 3 : edit comments #
Messages
Total messages: 23 (12 generated)
Description was changed from ========== Worker: Stop calling Isolate::TerminateExecution after a debugger task finishes BUG=487050 ========== to ========== Worker: Stop calling Isolate::TerminateExecution on a worker thread BUG=487050 ==========
Patchset #1 (id:1) has been deleted
Description was changed from ========== Worker: Stop calling Isolate::TerminateExecution on a worker thread BUG=487050 ========== to ========== Worker: Stop calling Isolate::TerminateExecution() on a worker thread When we need to stop worker script execution from the worker thread, we should call WorkerThread::prepareForShutdown() that provides more graceful shutdown sequence than Isolate::TerminateExecution(). BUG=487050 ==========
Description was changed from ========== Worker: Stop calling Isolate::TerminateExecution() on a worker thread When we need to stop worker script execution from the worker thread, we should call WorkerThread::prepareForShutdown() that provides more graceful shutdown sequence than Isolate::TerminateExecution(). BUG=487050 ========== to ========== Worker: Stop calling Isolate::TerminateExecution() on a worker thread When we need to stop worker script execution from the worker thread, we should call WorkerThread::prepareForShutdown() that provides more graceful shutdown sequence than Isolate::TerminateExecution(). BUG=487050 ==========
Description was changed from ========== Worker: Stop calling Isolate::TerminateExecution() on a worker thread When we need to stop worker script execution from the worker thread, we should call WorkerThread::prepareForShutdown() that provides more graceful shutdown sequence than Isolate::TerminateExecution(). BUG=487050 ========== to ========== Worker: Stop calling Isolate::TerminateExecution() on a worker thread When we need to stop further worker script execution from the worker thread, we should call WorkerThread::prepareForShutdown() that provides more graceful shutdown sequence than Isolate::TerminateExecution(). BUG=487050 ==========
nhiroki@chromium.org changed reviewers: + kinuko@chromium.org, yhirano@chromium.org
PTAL, thanks!
Description was changed from ========== Worker: Stop calling Isolate::TerminateExecution() on a worker thread When we need to stop further worker script execution from the worker thread, we should call WorkerThread::prepareForShutdown() that provides more graceful shutdown sequence than Isolate::TerminateExecution(). BUG=487050 ========== to ========== Worker: Stop calling Isolate::TerminateExecution() on a worker thread When we need to stop further worker script execution from the worker thread, we should call WorkerThread::prepareForShutdownOnWorkerThread() that provides more graceful shutdown sequence than Isolate::TerminateExecution(). BUG=487050 ==========
https://codereview.chromium.org/2015823002/diff/20001/third_party/WebKit/Sour... File third_party/WebKit/Source/core/workers/WorkerThread.cpp (right): https://codereview.chromium.org/2015823002/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/core/workers/WorkerThread.cpp:456: prepareForShutdownOnWorkerThread(); I'm not sure why this is needed, because we've already posted prepareForShutdownOnWorkerThread from WorkerThread::terminate. https://codereview.chromium.org/2015823002/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/core/workers/WorkerThread.cpp:456: prepareForShutdownOnWorkerThread(); m_threadStateMutex is not recursive, so you should not call this function here.
Thank you! Updated. https://codereview.chromium.org/2015823002/diff/20001/third_party/WebKit/Sour... File third_party/WebKit/Source/core/workers/WorkerThread.cpp (right): https://codereview.chromium.org/2015823002/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/core/workers/WorkerThread.cpp:456: prepareForShutdownOnWorkerThread(); On 2016/05/26 07:57:38, yhirano wrote: > m_threadStateMutex is not recursive, so you should not call this function here. Good point. Moved this to out of the critical section. https://codereview.chromium.org/2015823002/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/core/workers/WorkerThread.cpp:456: prepareForShutdownOnWorkerThread(); On 2016/05/26 07:57:38, yhirano wrote: > I'm not sure why this is needed, because we've already posted > prepareForShutdownOnWorkerThread from WorkerThread::terminate. Other tasks that may block the worker thread could be interleaved between this debugger task and that posted task. To avoid them, I think we should set m_readyToShutdown and dispose WorkerGlobalScope here.
lgtm https://codereview.chromium.org/2015823002/diff/40001/third_party/WebKit/Sour... File third_party/WebKit/Source/core/workers/WorkerThread.cpp (right): https://codereview.chromium.org/2015823002/diff/40001/third_party/WebKit/Sour... third_party/WebKit/Source/core/workers/WorkerThread.cpp:453: // close the event queue. nit: now that we also stop running more tasks after this we could maybe simply say: "Stop further worker tasks to run after this point." (here and the other place)
Thank you! Updated. https://codereview.chromium.org/2015823002/diff/40001/third_party/WebKit/Sour... File third_party/WebKit/Source/core/workers/WorkerThread.cpp (right): https://codereview.chromium.org/2015823002/diff/40001/third_party/WebKit/Sour... third_party/WebKit/Source/core/workers/WorkerThread.cpp:453: // close the event queue. On 2016/05/26 08:50:49, kinuko wrote: > nit: now that we also stop running more tasks after this we could maybe simply > say: "Stop further worker tasks to run after this point." (here and the other > place) Done.
lgtm
The CQ bit was checked by nhiroki@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from kinuko@chromium.org Link to the patchset: https://codereview.chromium.org/2015823002/#ps60001 (title: "edit comments")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2015823002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2015823002/60001
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: win_chromium_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_...)
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/2015823002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2015823002/60001
Message was sent while issue was closed.
Committed patchset #3 (id:60001)
Message was sent while issue was closed.
Description was changed from ========== Worker: Stop calling Isolate::TerminateExecution() on a worker thread When we need to stop further worker script execution from the worker thread, we should call WorkerThread::prepareForShutdownOnWorkerThread() that provides more graceful shutdown sequence than Isolate::TerminateExecution(). BUG=487050 ========== to ========== Worker: Stop calling Isolate::TerminateExecution() on a worker thread When we need to stop further worker script execution from the worker thread, we should call WorkerThread::prepareForShutdownOnWorkerThread() that provides more graceful shutdown sequence than Isolate::TerminateExecution(). BUG=487050 Committed: https://crrev.com/4a47d3b7f8bc3204f79d343711bd9578c411d480 Cr-Commit-Position: refs/heads/master@{#396212} ==========
Message was sent while issue was closed.
Patchset 3 (id:??) landed as https://crrev.com/4a47d3b7f8bc3204f79d343711bd9578c411d480 Cr-Commit-Position: refs/heads/master@{#396212} |