Reviewers: Mads Ager, Description: 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. Please review this at http://codereview.chromium.org/159265 SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/ Affected files: M src/serialize.cc Index: src/serialize.cc =================================================================== --- src/serialize.cc (revision 2523) +++ src/serialize.cc (working copy) @@ -1454,9 +1454,9 @@ 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()); } --~--~---------~--~----~------------~-------~--~----~ v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev -~----------~----~----~----~------~----~------~--~---
