Index: src/crankshaft/x64/lithium-codegen-x64.cc |
diff --git a/src/crankshaft/x64/lithium-codegen-x64.cc b/src/crankshaft/x64/lithium-codegen-x64.cc |
index e417eaaeb19b729cccd068813c902a5b4d2c90fb..6c2ab63e4a7b46488b831fa69912b7118665c2e8 100644 |
--- a/src/crankshaft/x64/lithium-codegen-x64.cc |
+++ b/src/crankshaft/x64/lithium-codegen-x64.cc |
@@ -167,7 +167,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 rdi. |