Commit eb17bfd1 authored by Dominik Röttsches's avatar Dominik Röttsches Committed by Commit Bot

Reset the sequence checker after UnsafeResetForTesting()

In unit tests, it turns out that the AtomicFlag may still be stuck to
its previous sequence. Detach it in UnsafeResetForTesting to avoid that.

Change-Id: I34b2e4953424c5aebd6ec55c8b13086617a16098
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2089759Reviewed-by: default avatarGabriel Charette <gab@chromium.org>
Commit-Queue: Dominik Röttsches <drott@chromium.org>
Cr-Commit-Position: refs/heads/master@{#747327}
parent 9fce6ad5
......@@ -24,6 +24,7 @@ void AtomicFlag::Set() {
}
void AtomicFlag::UnsafeResetForTesting() {
DETACH_FROM_SEQUENCE(set_sequence_checker_);
flag_.store(0, std::memory_order_release);
}
......
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