Index: src/isolate.cc |
diff --git a/src/isolate.cc b/src/isolate.cc |
index 1cc7ac736d2275a33dece53ef51bbb77bcbad795..b4910684825a520bdc85358777435cb3d83b12f0 100644 |
--- a/src/isolate.cc |
+++ b/src/isolate.cc |
@@ -833,6 +833,12 @@ Object* Isolate::StackOverflow() { |
Throw(*exception, nullptr); |
CaptureAndSetSimpleStackTrace(exception, factory()->undefined_value()); |
+#ifdef VERIFY_HEAP |
+ if (FLAG_verify_heap && FLAG_stress_compaction) { |
+ heap()->CollectAllAvailableGarbage("trigger compaction"); |
+ } |
+#endif // VERIFY_HEAP |
+ |
return heap()->exception(); |
} |