commit | 1a41481551aa1a3e11c1e3f17591e92ad7674ce1 | [log] [tgz] |
---|---|---|
author | Kenichi Ishibashi <bashi@chromium.org> | Tue Jan 26 00:56:16 2021 |
committer | Chromium LUCI CQ <chromium-scoped@luci-project-accounts.iam.gserviceaccount.com> | Tue Jan 26 00:56:16 2021 |
tree | b95addfc7a5384c187f6719f4189b6bcf8ebe0d6 | |
parent | fe0c951596d3439c910ba0b61fcdcddad005b430 [diff] |
service worker: Delay StartWorker() until all start callbacks are run The motivation of this change is to fix a DCHECK violation in DidEnsureLiveRegistrationForStartWorker(). The method assumes that there is at least one callback in `start_callbacks_` when a worker is STARTING because when starting a worker RecordStartWorkerResult() should be added to `start_callbacks_` to record UMA. However, before this CL the assumption was not satisfied because: * `start_callbacks_` are consumed before stopping the worker. * One of `start_callbacks_` could call RunAfterStartWorker(). At this point the worker is still STARTING and `start_callbacks_` is empty. * RunAfterStartWorker() results in calling DidEnsureLiveRegistrationForStartWorker(). This CL works around the problem by delaying StartWorker() calls from `start_callbacks_`. Bug: 1161800 Change-Id: I3d9f4996a5dbc2b3c8af7c8d8f484cd3aabf5900 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2642655 Commit-Queue: Kenichi Ishibashi <bashi@chromium.org> Reviewed-by: Matt Falkenhagen <falken@chromium.org> Cr-Commit-Position: refs/heads/master@{#846977}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
To check out the source code locally, don't use git clone
! Instead, follow the instructions on how to get the code.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .
For historical reasons, there are some small top level directories. Now the guidance is that new top level directories are for product (e.g. Chrome, Android WebView, Ash). Even if these products have multiple executables, the code should be in subdirectories of the product.