[PWA] Defer browser shutdown during PWA installation Create a ScopedKeepAlive for the duration of the OS integration portion of PWA installation. Installing the native app shim for a progressive web app on macOS can involve spawning a helper process and performing Mojo IPC with that process. If that happens right as the browser is about to shut down, the IO thread that services Mojo IPCs can exit while the PWA installation thread is waiting on a reply from its helper process. This results in the shutdown hanging as the main thread waits indefinitely for the thread pool to become idle and be torn down. This was easy to reproduce with browser tests in certain build configurations when ad-hoc signing for PWAs is enabled, but could theoretically happen in the browser itself if the timing was just right. The ScopedKeepAlive is not enabled for ChromeOS as it interacts poorly with browser tests that use `InstallSystemAppsForTesting`. I have filed https://crbug.com/394384898 to follow up on that. Fixed: 390734065 Include-Ci-Only-Tests: true Change-Id: Ie6e58c155bffda9c977682493e45384b4a6c511b Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6220602 Reviewed-by: Marijn Kruisselbrink <mek@chromium.org> Commit-Queue: Mark Rowe <markrowe@chromium.org> Reviewed-by: Nicolas Ouellet-Payeur <nicolaso@chromium.org> Cr-Commit-Position: refs/heads/main@{#1418736}
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.
If you found a bug, please file it at https://crbug.com/new.