Index: src/crankshaft/ia32/lithium-codegen-ia32.cc |
diff --git a/src/crankshaft/ia32/lithium-codegen-ia32.cc b/src/crankshaft/ia32/lithium-codegen-ia32.cc |
index 8233659ddbe22c8c4f603d6d6b80fe232e3cbb73..10f8e26244cef25d8bdde683a4d4e28f82406ad9 100644 |
--- a/src/crankshaft/ia32/lithium-codegen-ia32.cc |
+++ b/src/crankshaft/ia32/lithium-codegen-ia32.cc |
@@ -164,7 +164,7 @@ void LCodeGen::DoPrologue(LPrologue* instr) { |
Comment(";;; Prologue begin"); |
// Possibly allocate a local context. |
- if (info_->scope()->num_heap_slots() > 0) { |
+ if (info_->scope()->NeedsContext()) { |
Comment(";;; Allocate local context"); |
bool need_write_barrier = true; |
// Argument to NewContext is the function, which is still in edi. |