[compiler] Move ShrinkInstanceSize to MapUpdater and acquire its lock
The instance_size of a live map can change via ShrinkInstanceSize. This change was outside of the scope of the MapUpdater. In order to have a consistent view of the data, the concurrent reader will access the map updater lock if needed. Also refactor MapUpdaterMutexDepthScope (now named `MapUpdaterGuardIfNeeded`) so that A) it's not possible to forget to lock it, and B) add V8_NODISCARD to the class. As a second refactor use std::function in TraverseCallback. Bug: v8:7790 Change-Id: I57dd00699ccb1c9f132a950db93704b07ca115ac Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2862765Reviewed-by: Jakob Gruber <jgruber@chromium.org> Reviewed-by: Igor Sheludko <ishell@chromium.org> Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org> Cr-Commit-Position: refs/heads/master@{#74592}
Showing
Please
register
or
sign in
to comment