Index: src/factory.cc |
diff --git a/src/factory.cc b/src/factory.cc |
index 2dfe4a75a3ae9cbc349eef99623cb707bd2a3d6c..3c4a3774cb630c8af434ab9f0f49bc2d26adab3e 100644 |
--- a/src/factory.cc |
+++ b/src/factory.cc |
@@ -37,13 +37,15 @@ namespace internal { |
RETURN_OBJECT_UNLESS_RETRY(ISOLATE, TYPE) \ |
/* Two GCs before panicking. In newspace will almost always succeed. */ \ |
for (int __i__ = 0; __i__ < 2; __i__++) { \ |
- (ISOLATE)->heap()->CollectGarbage(__allocation__.RetrySpace(), \ |
- "allocation failure"); \ |
+ (ISOLATE)->heap()->CollectGarbage( \ |
+ __allocation__.RetrySpace(), \ |
+ GarbageCollectionReason::kAllocationFailure); \ |
__allocation__ = FUNCTION_CALL; \ |
RETURN_OBJECT_UNLESS_RETRY(ISOLATE, TYPE) \ |
} \ |
(ISOLATE)->counters()->gc_last_resort_from_handles()->Increment(); \ |
- (ISOLATE)->heap()->CollectAllAvailableGarbage("last resort gc"); \ |
+ (ISOLATE)->heap()->CollectAllAvailableGarbage( \ |
+ GarbageCollectionReason::kLastResort); \ |
{ \ |
AlwaysAllocateScope __scope__(ISOLATE); \ |
__allocation__ = FUNCTION_CALL; \ |
@@ -54,7 +56,6 @@ namespace internal { |
return Handle<TYPE>(); \ |
} while (false) |
- |
template<typename T> |
Handle<T> Factory::New(Handle<Map> map, AllocationSpace space) { |
CALL_HEAP_FUNCTION( |