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

Unified Diff: runtime/vm/pages.cc

Issue 1119403003: Propagate failures from VirtualMemory::Commit. (Closed) Base URL: http://dart.googlecode.com/svn/trunk/dart/
Patch Set: Created 5 years, 8 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
« no previous file with comments | « runtime/vm/pages.h ('k') | runtime/vm/virtual_memory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/pages.cc
===================================================================
--- runtime/vm/pages.cc (revision 45492)
+++ runtime/vm/pages.cc (working copy)
@@ -48,8 +48,9 @@
HeapPage* HeapPage::Initialize(VirtualMemory* memory, PageType type) {
ASSERT(memory->size() > VirtualMemory::PageSize());
bool is_executable = (type == kExecutable);
- memory->Commit(is_executable);
-
+ if (!memory->Commit(is_executable)) {
+ return NULL;
Ivan Posva 2015/05/04 18:16:02 We should unreserve if we fail.
koda 2015/05/04 18:19:08 Done.
+ }
HeapPage* result = reinterpret_cast<HeapPage*>(memory->address());
result->memory_ = memory;
result->next_ = NULL;
« no previous file with comments | « runtime/vm/pages.h ('k') | runtime/vm/virtual_memory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698