Index: runtime/vm/freelist.cc |
=================================================================== |
--- runtime/vm/freelist.cc (revision 44732) |
+++ runtime/vm/freelist.cc (working copy) |
@@ -70,7 +70,7 @@ |
uword FreeList::TryAllocateLocked(intptr_t size, bool is_protected) { |
- DEBUG_ASSERT(mutex_->Owner() == Isolate::Current()); |
+ DEBUG_ASSERT(mutex_->IsOwnedByCurrentThread()); |
// Precondition: is_protected is false or else all free list elements are |
// in non-writable pages. |
@@ -183,7 +183,7 @@ |
void FreeList::FreeLocked(uword addr, intptr_t size) { |
- DEBUG_ASSERT(mutex_->Owner() == Isolate::Current()); |
+ DEBUG_ASSERT(mutex_->IsOwnedByCurrentThread()); |
// Precondition required by AsElement and EnqueueElement: the (page |
// containing the) header of the freed block should be writable. This is |
// the case when called for newly allocated pages because they are |
@@ -249,7 +249,7 @@ |
intptr_t FreeList::LengthLocked(int index) const { |
- DEBUG_ASSERT(mutex_->Owner() == Isolate::Current()); |
+ DEBUG_ASSERT(mutex_->IsOwnedByCurrentThread()); |
ASSERT(index >= 0); |
ASSERT(index < kNumLists); |
intptr_t result = 0; |
@@ -362,7 +362,7 @@ |
FreeListElement* FreeList::TryAllocateLargeLocked(intptr_t minimum_size) { |
- DEBUG_ASSERT(mutex_->Owner() == Isolate::Current()); |
+ DEBUG_ASSERT(mutex_->IsOwnedByCurrentThread()); |
FreeListElement* previous = NULL; |
FreeListElement* current = free_lists_[kNumLists]; |
// TODO(koda): Find largest. |
@@ -384,7 +384,7 @@ |
uword FreeList::TryAllocateSmallLocked(intptr_t size) { |
- DEBUG_ASSERT(mutex_->Owner() == Isolate::Current()); |
+ DEBUG_ASSERT(mutex_->IsOwnedByCurrentThread()); |
if (size > last_free_small_size_) { |
return 0; |
} |