Change the CALL_HEAP_FUNCTION macro so that it is no longer a cpplint
exception. Review URL: http://codereview.chromium.org/39334 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1450 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
ece2c03160
commit
ee2601dc3b
@ -226,43 +226,43 @@ void Heap::ClearKeyedLookupCache() {
|
||||
do { \
|
||||
GC_GREEDY_CHECK(); \
|
||||
Object* __object__ = FUNCTION_CALL; \
|
||||
if (!__object__->IsFailure()) return RETURN_VALUE; \
|
||||
if (!__object__->IsFailure()) RETURN_VALUE; \
|
||||
if (__object__->IsOutOfMemoryFailure()) { \
|
||||
v8::internal::V8::FatalProcessOutOfMemory("CALL_AND_RETRY_0"); \
|
||||
} \
|
||||
if (!__object__->IsRetryAfterGC()) return RETURN_EMPTY; \
|
||||
if (!__object__->IsRetryAfterGC()) RETURN_EMPTY; \
|
||||
Heap::CollectGarbage(Failure::cast(__object__)->requested(), \
|
||||
Failure::cast(__object__)->allocation_space()); \
|
||||
__object__ = FUNCTION_CALL; \
|
||||
if (!__object__->IsFailure()) return RETURN_VALUE; \
|
||||
if (!__object__->IsFailure()) RETURN_VALUE; \
|
||||
if (__object__->IsOutOfMemoryFailure()) { \
|
||||
v8::internal::V8::FatalProcessOutOfMemory("CALL_AND_RETRY_1"); \
|
||||
} \
|
||||
if (!__object__->IsRetryAfterGC()) return RETURN_EMPTY; \
|
||||
if (!__object__->IsRetryAfterGC()) RETURN_EMPTY; \
|
||||
Counters::gc_last_resort_from_handles.Increment(); \
|
||||
Heap::CollectAllGarbage(); \
|
||||
{ \
|
||||
AlwaysAllocateScope __scope__; \
|
||||
__object__ = FUNCTION_CALL; \
|
||||
} \
|
||||
if (!__object__->IsFailure()) return RETURN_VALUE; \
|
||||
if (!__object__->IsFailure()) RETURN_VALUE; \
|
||||
if (__object__->IsOutOfMemoryFailure()) { \
|
||||
/* TODO(1181417): Fix this. */ \
|
||||
v8::internal::V8::FatalProcessOutOfMemory("CALL_AND_RETRY_2"); \
|
||||
} \
|
||||
ASSERT(!__object__->IsRetryAfterGC()); \
|
||||
return RETURN_EMPTY; \
|
||||
RETURN_EMPTY; \
|
||||
} while (false)
|
||||
|
||||
|
||||
#define CALL_HEAP_FUNCTION(FUNCTION_CALL, TYPE) \
|
||||
CALL_AND_RETRY(FUNCTION_CALL, \
|
||||
Handle<TYPE>(TYPE::cast(__object__)), \
|
||||
Handle<TYPE>())
|
||||
#define CALL_HEAP_FUNCTION(FUNCTION_CALL, TYPE) \
|
||||
CALL_AND_RETRY(FUNCTION_CALL, \
|
||||
return Handle<TYPE>(TYPE::cast(__object__)), \
|
||||
return Handle<TYPE>())
|
||||
|
||||
|
||||
#define CALL_HEAP_FUNCTION_VOID(FUNCTION_CALL) \
|
||||
CALL_AND_RETRY(FUNCTION_CALL, ;, ;) // NOLINT
|
||||
CALL_AND_RETRY(FUNCTION_CALL, return, return)
|
||||
|
||||
|
||||
#ifdef DEBUG
|
||||
|
Loading…
Reference in New Issue
Block a user