-
Leszek Swirski authored
Since the string-table's data pointer is written inside a mutex, but read outside of it, we need to acq/rel access to it. There's no support in C++ for an std::atomic<std::unique_ptr>, so this patch changes the std::unique_ptr<Data> into a std::atomic<Data*>, and handles the deletion manually. StringTable::Data still uses std::unique_ptr as the general pointer-passing contract, we just carefully set and release the unique_ptrs when accessing and setting the StringTable's atomic Data pointer. Change-Id: I711a56825e2f5f9b2db63d1874e09c2627af54b8 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2410057 Commit-Queue: Leszek Swirski <leszeks@chromium.org> Commit-Queue: Jakob Gruber <jgruber@chromium.org> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Reviewed-by: Igor Sheludko <ishell@chromium.org> Reviewed-by: Toon Verwaest <verwaest@chromium.org> Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Auto-Submit: Leszek Swirski <leszeks@chromium.org> Cr-Commit-Position: refs/heads/master@{#69932}
9786a960