HashTable: Always include <atomic>
Follow-up to commit 470bf888 ("heap: Resolve data race in addition to HashTable"), which started using std::atomic outside the DUMP_HASHTABLE_STATS ifdef. This fixes the build with libstdc++ (it looks like <atomic> was being implicitly included by libc++): ../../third_party/blink/renderer/platform/wtf/hash_table.h:1796:31: error: implicit instantiation of undefined template 'std::atomic<std::pair<blink::OffererState, blink::OffererState> *>' AsAtomic<ValueType*>(table_).store(new_table, std::memory_order_relaxed); ^ ../../third_party/blink/renderer/platform/wtf/hash_table.h:1863:22: note: in instantiation of member function 'WTF::HashTable<std::pair<blink::OffererState, blink::OffererState>, std::pair<blink::OffererState, blink::OffererState>, WTF::IdentityExtractor, WTF::PairHash<blink::OffererState, blink::OffererState>, WTF::HashTraits<std::pair<blink::OffererState , blink::OffererState> >, WTF::HashTraits<std::pair<blink::OffererState, blink::OffererState> >, WTF::PartitionAllocator>::RehashTo' requested here Value* new_entry = RehashTo(new_table, new_table_size, entry); ^ ../../third_party/blink/renderer/platform/wtf/hash_table.h:1068:5: note: in instantiation of member function 'WTF::HashTable<std::pair<blink::OffererState, blink::OffererState>, std::pair<blink::OffererState, blink::OffererState>, WTF::IdentityExtractor, WTF::PairHash<blink::OffererState, blink::OffererState>, WTF::HashTraits<std::pair<blink::OffererState, blink::OffererState> >, WTF::HashTraits<std::pair<blink::OffererState, blink::OffererState> >, WTF::PartitionAllocator>::Rehash' requested here Rehash(new_capacity, nullptr); ^ ../../third_party/blink/renderer/platform/wtf/hash_set.h:180:11: note: in instantiation of member function 'WTF::HashTable<std::pair<blink::OffererState, blink::OffererState>, std::pair<blink::OffererState, blink::OffererState>, WTF::IdentityExtractor, WTF::PairHash<blink::OffererState, blink::OffererState>, WTF::HashTraits<std::pair<blink::OffererState, b link::OffererState> >, WTF::HashTraits<std::pair<blink::OffererState, blink::OffererState> >, WTF::PartitionAllocator>::ReserveCapacityForSize' requested here impl_.ReserveCapacityForSize(SafeCast<wtf_size_t>(elements.size())); ^ ../../third_party/blink/renderer/modules/peerconnection/call_setup_state_tracker.cc:26:7: note: in instantiation of member function 'WTF::HashSet<std::pair<blink::OffererState, blink::OffererState>, WTF::PairHash<blink::OffererState, blink::OffererState>, WTF::HashTraits<std::pair<blink::OffererState, blink::OffererState> >, WTF::PartitionAllocator>::HashS et' requested here : valid_offerer_transitions_( ^ /usr/lib/gcc/x86_64-redhat-linux/9/../../../../include/c++/9/bits/atomic_base.h:148:12: note: template is declared here struct atomic<_Tp*>; ^ Bug: 957519 Change-Id: I0694785f6f5191b82773ea5144dfba20b113afb1 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1951024 Auto-Submit: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com> Commit-Queue: Kentaro Hara <haraken@chromium.org> Reviewed-by:Kentaro Hara <haraken@chromium.org> Cr-Commit-Position: refs/heads/master@{#721762}
Showing
Please register or sign in to comment