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

Side by Side Diff: src/isolate.cc

Issue 11824064: Make v8 handle OOM during Heap construction more gracefully. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/api.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 1985 matching lines...) Expand 10 before | Expand all | Expand 10 after
1996 // will ensure this too, but we don't have to use lockers if we are only 1996 // will ensure this too, but we don't have to use lockers if we are only
1997 // using one thread. 1997 // using one thread.
1998 ExecutionAccess lock(this); 1998 ExecutionAccess lock(this);
1999 stack_guard_.InitThread(lock); 1999 stack_guard_.InitThread(lock);
2000 } 2000 }
2001 2001
2002 // SetUp the object heap. 2002 // SetUp the object heap.
2003 const bool create_heap_objects = (des == NULL); 2003 const bool create_heap_objects = (des == NULL);
2004 ASSERT(!heap_.HasBeenSetUp()); 2004 ASSERT(!heap_.HasBeenSetUp());
2005 if (!heap_.SetUp(create_heap_objects)) { 2005 if (!heap_.SetUp(create_heap_objects)) {
2006 V8::SetFatalError(); 2006 V8::FatalProcessOutOfMemory("heap setup");
2007 return false; 2007 return false;
2008 } 2008 }
2009 2009
2010 if (create_heap_objects) { 2010 if (create_heap_objects) {
2011 // Terminate the cache array with the sentinel so we can iterate. 2011 // Terminate the cache array with the sentinel so we can iterate.
2012 PushToPartialSnapshotCache(heap_.undefined_value()); 2012 PushToPartialSnapshotCache(heap_.undefined_value());
2013 } 2013 }
2014 2014
2015 InitializeThreadLocal(); 2015 InitializeThreadLocal();
2016 2016
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
2211 2211
2212 #ifdef DEBUG 2212 #ifdef DEBUG
2213 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \ 2213 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \
2214 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_); 2214 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_);
2215 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) 2215 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET)
2216 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) 2216 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET)
2217 #undef ISOLATE_FIELD_OFFSET 2217 #undef ISOLATE_FIELD_OFFSET
2218 #endif 2218 #endif
2219 2219
2220 } } // namespace v8::internal 2220 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/api.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698