Commit 25421c9c authored by kasperl@chromium.org's avatar kasperl@chromium.org

Ignore result of calling Heap::CollectGarbage and continue

to try the next allocation. This is consistent with how we
handle it when calling from JavaScript to C++.
Review URL: http://codereview.chromium.org/8916

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@659 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 95e880ad
......@@ -222,16 +222,12 @@ void Heap::ClearKeyedLookupCache() {
v8::internal::V8::FatalProcessOutOfMemory("CALL_AND_RETRY_0"); \
} \
if (!__object__->IsRetryAfterGC()) return RETURN_EMPTY; \
if (!Heap::CollectGarbage( \
Failure::cast(__object__)->requested(), \
Failure::cast(__object__)->allocation_space())) { \
v8::internal::V8::FatalProcessOutOfMemory("CALL_AND_RETRY_1"); \
return RETURN_EMPTY; \
} \
Heap::CollectGarbage(Failure::cast(__object__)->requested(), \
Failure::cast(__object__)->allocation_space()); \
__object__ = FUNCTION_CALL; \
if (!__object__->IsFailure()) return RETURN_VALUE; \
if (__object__->IsOutOfMemoryFailure()) { \
v8::internal::V8::FatalProcessOutOfMemory("CALL_AND_RETRY_2"); \
v8::internal::V8::FatalProcessOutOfMemory("CALL_AND_RETRY_1"); \
} \
if (!__object__->IsRetryAfterGC()) return RETURN_EMPTY; \
Counters::gc_last_resort_from_handles.Increment(); \
......@@ -243,7 +239,7 @@ void Heap::ClearKeyedLookupCache() {
if (!__object__->IsFailure()) return RETURN_VALUE; \
if (__object__->IsOutOfMemoryFailure()) { \
/* TODO(1181417): Fix this. */ \
v8::internal::V8::FatalProcessOutOfMemory("CALL_AND_RETRY_3"); \
v8::internal::V8::FatalProcessOutOfMemory("CALL_AND_RETRY_2"); \
} \
ASSERT(!__object__->IsRetryAfterGC()); \
return RETURN_EMPTY; \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment