Commit 0c0a67fb authored by Jeremy Roman's avatar Jeremy Roman Committed by Commit Bot

WTF: Remove WTF::MutexBase::Locked.

It has been superseded by AssertAcquired.

Bug: 856641
Change-Id: Iebb6ea251dc4102ec3cb5b2a46f80afeedeb462c
Reviewed-on: https://chromium-review.googlesource.com/1201349Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Commit-Queue: Jeremy Roman <jbroman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#588416}
parent 58a93801
......@@ -198,7 +198,7 @@ void CrossThreadPersistentRegion::PrepareForThreadStateTermination(
#if defined(ADDRESS_SANITIZER)
void CrossThreadPersistentRegion::UnpoisonCrossThreadPersistents() {
#if DCHECK_IS_ON()
DCHECK(ProcessHeap::CrossThreadPersistentMutex().Locked());
ProcessHeap::CrossThreadPersistentMutex().AssertAcquired();
#endif
int persistent_count = 0;
for (PersistentNodeSlots* slots = persistent_region_.slots_; slots;
......
......@@ -183,7 +183,7 @@ class CrossThreadPersistentRegion final {
void FreePersistentNode(PersistentNode*& persistent_node) {
#if DCHECK_IS_ON()
DCHECK(ProcessHeap::CrossThreadPersistentMutex().Locked());
ProcessHeap::CrossThreadPersistentMutex().AssertAcquired();
#endif
// When the thread that holds the heap object that the cross-thread
// persistent shuts down, prepareForThreadStateTermination() will clear out
......
......@@ -71,14 +71,11 @@ class WTF_EXPORT MutexBase {
void lock();
void unlock();
void AssertAcquired() const {
#if DCHECK_IS_ON()
// Deprecated in favour of AssertAcquired.
bool Locked() const { return mutex_.recursion_count_ > 0; }
void AssertAcquired() const { DCHECK(Locked()); }
#else
void AssertAcquired() const {}
DCHECK(mutex_.recursion_count_);
#endif
}
public:
PlatformMutex& Impl() { return mutex_; }
......
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