Chromium Code Reviews| Index: runtime/vm/virtual_memory_fuchsia.cc |
| diff --git a/runtime/vm/virtual_memory_fuchsia.cc b/runtime/vm/virtual_memory_fuchsia.cc |
| index 964ca797ee08dba066c73ae884aab0cdf05330f4..537409370c01112fdbe441a05e811540b7735e4b 100644 |
| --- a/runtime/vm/virtual_memory_fuchsia.cc |
| +++ b/runtime/vm/virtual_memory_fuchsia.cc |
| @@ -25,8 +25,9 @@ void VirtualMemory::InitOnce() { |
| VirtualMemory* VirtualMemory::ReserveInternal(intptr_t size) { |
| - mx_handle_t vmo = mx_vmo_create(size); |
| - if (vmo <= 0) { |
| + mx_handle_t vmo = MX_HANDLE_INVALID; |
| + mx_status_t status = mx_vmo_create(size, 0u, &mx); |
|
zra
2016/11/02 22:20:06
mx -> vmo?
|
| + if (status != NO_ERROR) { |
| return NULL; |
| } |
| @@ -37,7 +38,7 @@ VirtualMemory* VirtualMemory::ReserveInternal(intptr_t size) { |
| MX_VM_FLAG_PERM_WRITE | |
| MX_VM_FLAG_PERM_EXECUTE; |
| uintptr_t addr; |
| - mx_status_t status = mx_process_map_vm( |
| + status = mx_process_map_vm( |
| mx_process_self(), vmo, 0, size, &addr, prot); |
| if (status != NO_ERROR) { |
| mx_handle_close(vmo); |