| 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.
|
|
|