Bug 1828024 - Require the helper thread lock in the GC helper thread count getter...
commit8a21090cbb92d41786a32691215b168b9bd604fa
authorJon Coppeard <jcoppeard@mozilla.com>
Wed, 21 Jun 2023 07:19:07 +0000 (21 07:19 +0000)
committerJon Coppeard <jcoppeard@mozilla.com>
Wed, 21 Jun 2023 07:19:07 +0000 (21 07:19 +0000)
treeabe8bf84858ed8b8ba16c3b4c53fd7bba07c79ee
parent78f10a63485c9b4319b170bf0cea5226d709c176
Bug 1828024 - Require the helper thread lock in the GC helper thread count getter r=sfink

This makes us take a lock to read this state (we already lock when writing it).

Also it adds a release assert in case something goes wrong with the thread
count calculations, as a crash is preferable to the potential deadlock.

Differential Revision: https://phabricator.services.mozilla.com/D181257
js/src/gc/GC.cpp
js/src/gc/ParallelMarking.cpp
js/src/vm/HelperThreadState.h