Index: runtime/vm/virtual_memory_macos.cc |
diff --git a/runtime/vm/virtual_memory_macos.cc b/runtime/vm/virtual_memory_macos.cc |
index 484ad7876616fda5d25850acc08d68711fe162d0..1d23eaded9ef3b844915a96c1131ceb45a2c4d62 100644 |
--- a/runtime/vm/virtual_memory_macos.cc |
+++ b/runtime/vm/virtual_memory_macos.cc |
@@ -83,6 +83,7 @@ bool VirtualMemory::Commit(uword addr, intptr_t size, bool executable) { |
bool VirtualMemory::Protect(void* address, intptr_t size, Protection mode) { |
ASSERT(Thread::Current()->IsMutatorThread() || |
+ !Isolate::Current()->HasMutatorThread() || |
Isolate::Current()->mutator_thread()->IsAtSafepoint()); |
uword start_address = reinterpret_cast<uword>(address); |
uword end_address = start_address + size; |