Index: test/mjsunit/allocation-site-info.js |
diff --git a/test/mjsunit/allocation-site-info.js b/test/mjsunit/allocation-site-info.js |
index 35b60ee266f0ab27cbffff27a51f880d717ecdcc..0545754aa3c2aa8de15d48f8837270feb954af80 100644 |
--- a/test/mjsunit/allocation-site-info.js |
+++ b/test/mjsunit/allocation-site-info.js |
@@ -414,6 +414,11 @@ if (support_smi_only_arrays) { |
assertKind(elements_kind.fast, obj[1][0]); |
})(); |
+ // Perform a gc because without it the test below can experience an |
+ // allocation failure at an inconvenient point. Allocation mementos get |
+ // cleared on gc, and they can't deliver elements kind feedback when that |
+ // happens. |
+ gc(); |
// Make sure object literals with array fields benefit from the type feedback |
// that allocation mementos provide. |