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

Unified Diff: src/builtins.cc

Issue 8734: Fix 3 places where we were doing retry after GC without using the macros that... (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') | src/jsregexp.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/builtins.cc
===================================================================
--- src/builtins.cc (revision 647)
+++ src/builtins.cc (working copy)
@@ -642,13 +642,12 @@
CodeDesc desc;
masm.GetCode(&desc);
Code::Flags flags = functions[i].flags;
- Object* 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);
- }
+ Object* code;
+ {
+ // During startup it's OK to always allocate and defer GC to later.
+ // This simplifies things because we don't need to retry.
+ AlwaysAllocateScope __scope__;
+ code = Heap::CreateCode(desc, NULL, flags);
if (code->IsFailure()) {
v8::internal::V8::FatalProcessOutOfMemory("CreateCode");
}
« no previous file with comments | « no previous file | src/factory.cc » ('j') | src/jsregexp.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698