[heap] Forces CodeSpaceMemoryModificationScope only in safepoints
CodeSpaceMemoryModificationScope should only be used by the main thread and during a safepoint. This adds a check in CodeSpaceMemoryModificationScope. The reason for this is that CodeSpaceMemoryModificationScope is not thread-safe. It assumes that no other thread is modifying code space (either by setting memory permission or adding a new page). This CL also replaces CodeSpaceMemoryModificationScope to CodePageCollectionMemoryModificationScope in a few occurrences, where the former is not needed. This should not hurt performance. Bug: v8:12054 Change-Id: I2675e667782c6ad8410877a4e64374899066bcd1 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3263890 Commit-Queue: Victor Gomes <victorgomes@chromium.org> Reviewed-by: Dominik Inführ <dinfuehr@chromium.org> Reviewed-by: Andreas Haas <ahaas@chromium.org> Cr-Commit-Position: refs/heads/main@{#77732}
Showing
Please
register
or
sign in
to comment