• Kent Tamura's avatar
    Make DUMP_HASHTABLE_STATS* buildable. · 406254d7
    Kent Tamura authored
    clang produces errors for conditional mutex locking in
    HashTableStats::recordCollisionAtCount() and
    HashTableStats::DumpStats().
    
    > .../wtf/HashTable.cpp:56:7: error: mutex 'hashTableStatsMutex()' is not held on every path through here [-Werror,-Wthread-safety-analysis]
    >   if (count > maxCollisions)
    >       ^
    
    Avoid such errors by moving lock() and unlock() into a single block.
    
    This CL has no behavior changes.
    
    Change-Id: If64ca5700bda0d881fd96ee84b8115b419a8aa63
    Reviewed-on: https://chromium-review.googlesource.com/974667Reviewed-by: default avatarYuta Kitamura <yutak@chromium.org>
    Commit-Queue: Kent Tamura <tkent@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#545032}
    406254d7
HashTable.h 71.2 KB