Commit a523f5ca authored by jameslahm's avatar jameslahm Committed by V8 LUCI CQ

[runtime] Delete thread local keys in Isolate::DisposeOncePerProcess

Isolate::isolate_key_ and Isolate::per_isolate_thread_data_key_ are
created in Isolate::InitializeOncePerProcess() and should be deleted in
Isolate::DisposeOncePerProcess().

Bug: v8:11914
Change-Id: Ic3000d21f86a9d419373ef7c777c21661f544fee
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3490712Reviewed-by: 's avatarIgor Sheludko <ishell@chromium.org>
Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79341}
parent cfcac7a2
......@@ -520,9 +520,11 @@ void Isolate::InitializeOncePerProcess() {
}
void Isolate::DisposeOncePerProcess() {
base::Thread::DeleteThreadLocalKey(isolate_key_);
bool expected = true;
CHECK(isolate_key_created_.compare_exchange_strong(
expected, false, std::memory_order_relaxed));
base::Thread::DeleteThreadLocalKey(per_isolate_thread_data_key_);
}
Address Isolate::get_address_from_id(IsolateAddressId id) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment