Index: runtime/vm/virtual_memory_macos.cc |
diff --git a/runtime/vm/virtual_memory_macos.cc b/runtime/vm/virtual_memory_macos.cc |
index c3b004d808693a7bc83445138c90e5a3dc4ce830..5e33bb3a9a332eeccccce7e9135d4c68701d2cc0 100644 |
--- a/runtime/vm/virtual_memory_macos.cc |
+++ b/runtime/vm/virtual_memory_macos.cc |
@@ -54,7 +54,7 @@ static void unmap(void* address, intptr_t size) { |
VirtualMemory::~VirtualMemory() { |
- if (!embedder_allocated()) { |
+ if (!vm_owns_region()) { |
unmap(address(), reserved_size_); |
} |
} |