Index: test/cctest/test-weakmaps.cc |
diff --git a/test/cctest/test-weakmaps.cc b/test/cctest/test-weakmaps.cc |
index 04f41b9aee979161b05a6ebb2c74e5b6792c7459..2f947d76a5e24b79f52c7b78c422a7451cb22a4f 100644 |
--- a/test/cctest/test-weakmaps.cc |
+++ b/test/cctest/test-weakmaps.cc |
@@ -184,7 +184,8 @@ TEST(Regress2060a) { |
// Start second old-space page so that values land on evacuation candidate. |
Page* first_page = heap->old_pointer_space()->anchor()->next_page(); |
- factory->NewFixedArray(900 * KB / kPointerSize, TENURED); |
+ int dummy_array_size = Page::kMaxRegularHeapObjectSize - 92 * KB; |
+ factory->NewFixedArray(dummy_array_size / kPointerSize, TENURED); |
// Fill up weak map with values on an evacuation candidate. |
{ |
@@ -222,7 +223,8 @@ TEST(Regress2060b) { |
// Start second old-space page so that keys land on evacuation candidate. |
Page* first_page = heap->old_pointer_space()->anchor()->next_page(); |
- factory->NewFixedArray(900 * KB / kPointerSize, TENURED); |
+ int dummy_array_size = Page::kMaxRegularHeapObjectSize - 92 * KB; |
+ factory->NewFixedArray(dummy_array_size / kPointerSize, TENURED); |
// Fill up weak map with keys on an evacuation candidate. |
Handle<JSObject> keys[32]; |