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

Unified Diff: src/spaces.cc

Issue 10271010: Merge r11471 from the bleeding_edge to the 3.8 branch. (Closed) Base URL: http://v8.googlecode.com/svn/branches/3.8/
Patch Set: Created 8 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 | « src/spaces.h ('k') | src/version.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/spaces.cc
===================================================================
--- src/spaces.cc (revision 11472)
+++ src/spaces.cc (working copy)
@@ -362,15 +362,22 @@
if (base == NULL) return NULL;
if (executable == EXECUTABLE) {
- CommitCodePage(&reservation, base, size);
+ if (!CommitCodePage(&reservation, base, size)) {
+ base = NULL;
+ }
} else {
- if (!reservation.Commit(base,
- size,
- executable == EXECUTABLE)) {
- return NULL;
+ if (!reservation.Commit(base, size, false)) {
+ base = NULL;
}
}
+ if (base == NULL) {
+ // Failed to commit the body. Release the mapping and any partially
+ // commited regions inside it.
+ reservation.Release();
+ return NULL;
+ }
+
controller->TakeControl(&reservation);
return base;
}
« no previous file with comments | « src/spaces.h ('k') | src/version.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698