Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4518)

Unified Diff: runtime/vm/virtual_memory_macos.cc

Issue 2191723002: Fix race condition with HasMutatorThread that was being used without a lock. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Address self review comments. Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: runtime/vm/virtual_memory_macos.cc
diff --git a/runtime/vm/virtual_memory_macos.cc b/runtime/vm/virtual_memory_macos.cc
index 1d23eaded9ef3b844915a96c1131ceb45a2c4d62..484ad7876616fda5d25850acc08d68711fe162d0 100644
--- a/runtime/vm/virtual_memory_macos.cc
+++ b/runtime/vm/virtual_memory_macos.cc
@@ -83,7 +83,6 @@ 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;

Powered by Google App Engine
This is Rietveld 408576698