Index: src/ia32/macro-assembler-ia32.cc |
diff --git a/src/ia32/macro-assembler-ia32.cc b/src/ia32/macro-assembler-ia32.cc |
index b08ee92b1bf556a6a4d6d295f2443ab5d6d1ff3e..2ab5a259321cd2cd8095fcd43c14a1886d40e62d 100644 |
--- a/src/ia32/macro-assembler-ia32.cc |
+++ b/src/ia32/macro-assembler-ia32.cc |
@@ -1248,6 +1248,7 @@ void MacroAssembler::Allocate(int object_size, |
Label* gc_required, |
AllocationFlags flags) { |
ASSERT((flags & (RESULT_CONTAINS_TOP | SIZE_IN_WORDS)) == 0); |
+ ASSERT(object_size <= Page::kMaxNonCodeHeapObjectSize); |
if (!FLAG_inline_new) { |
if (emit_debug_code()) { |
// Trash the registers to simulate an allocation failure. |