Call the (fatal) V8 out of memory handler if we cannot allocate enough
memory from the OS to deserialize the initial heap snapshot at startup. This catches the failure to startup earlier, and avoids dereferencing the encoding of an allocation failure. BUG=16359 Review URL: http://codereview.chromium.org/159265 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2526 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
270c0e8b8f
commit
4196711d2e
@ -1454,9 +1454,9 @@ void Deserializer::GetLog() {
|
||||
static void InitPagedSpace(PagedSpace* space,
|
||||
int capacity,
|
||||
List<Page*>* page_list) {
|
||||
space->EnsureCapacity(capacity);
|
||||
// TODO(1240712): PagedSpace::EnsureCapacity can return false due to
|
||||
// a failure to allocate from the OS to expand the space.
|
||||
if (!space->EnsureCapacity(capacity)) {
|
||||
V8::FatalProcessOutOfMemory("InitPagedSpace");
|
||||
}
|
||||
PageIterator it(space, PageIterator::ALL_PAGES);
|
||||
while (it.has_next()) page_list->Add(it.next());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user