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

Unified Diff: src/builtins.cc

Issue 6340: If an allocation is so huge that we cannot code the size needed in the failur... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 12 years, 2 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 | « no previous file | src/factory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/builtins.cc
===================================================================
--- src/builtins.cc (revision 469)
+++ src/builtins.cc (working copy)
@@ -674,10 +674,15 @@
masm.GetCode(&desc);
Code::Flags flags = functions[i].flags;
Object* code = Heap::CreateCode(desc, NULL, flags);
- if (code->IsRetryAfterGC()) {
- CHECK(Heap::CollectGarbage(Failure::cast(code)->requested(),
- Failure::cast(code)->allocation_space()));
- code = Heap::CreateCode(desc, NULL, flags);
+ if (code->IsFailure()) {
+ if (code->IsRetryAfterGC()) {
+ CHECK(Heap::CollectGarbage(Failure::cast(code)->requested(),
+ Failure::cast(code)->allocation_space()));
+ code = Heap::CreateCode(desc, NULL, flags);
+ }
+ if (code->IsFailure()) {
+ v8::internal::V8::FatalProcessOutOfMemory("CreateCode");
+ }
}
// Add any unresolved jumps or calls to the fixup list in the
// bootstrapper.
« no previous file with comments | « no previous file | src/factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698