Use NoDestructor for ServiceWorkerDevToolsManager instead of Singleton.
In a WIP patch changing sevice worker unit tests, I somtimes get crashes on test exit because ServiceWorkerDevToolsManager is accessed on a thread that doesn't exist (I'm guessing the UI thread has been torn down). I think the manager singleton gets destructed which causes hosts to try to access the manager instance. The problem seems to go away by changing from Singleton to NoDestructor. NoDestructor is preferred anyway as documented in singleton.h. Change-Id: I70eb6435ed7eea1362e115488ae4999dedcba387 Reviewed-on: https://chromium-review.googlesource.com/c/1457883 Auto-Submit: Matt Falkenhagen <falken@chromium.org> Commit-Queue: Dmitry Gozman <dgozman@chromium.org> Reviewed-by:Dmitry Gozman <dgozman@chromium.org> Cr-Commit-Position: refs/heads/master@{#629994}
Showing
Please register or sign in to comment