| Index: src/runtime.cc
|
| diff --git a/src/runtime.cc b/src/runtime.cc
|
| index 78605b8313296f351a9f18e79774b8dfe09143c4..b8888ba8544d4f7d63f60a54f9280b9b9053d6de 100644
|
| --- a/src/runtime.cc
|
| +++ b/src/runtime.cc
|
| @@ -12252,6 +12252,9 @@ void Runtime::PerformGC(Object* result) {
|
| Isolate* isolate = Isolate::Current();
|
| Failure* failure = Failure::cast(result);
|
| if (failure->IsRetryAfterGC()) {
|
| + if (isolate->heap()->new_space()->AddFreshPage()) {
|
| + return;
|
| + }
|
| // Try to do a garbage collection; ignore it if it fails. The C
|
| // entry stub will throw an out-of-memory exception in that case.
|
| isolate->heap()->CollectGarbage(failure->allocation_space());
|
|
|