Index: src/ia32/lithium-codegen-ia32.cc |
diff --git a/src/ia32/lithium-codegen-ia32.cc b/src/ia32/lithium-codegen-ia32.cc |
index f0cd7b0008aedcc985eaf1a8bb224a3374f8cc9b..f15760038ff497437178fecb0f58250f9a0bc190 100644 |
--- a/src/ia32/lithium-codegen-ia32.cc |
+++ b/src/ia32/lithium-codegen-ia32.cc |
@@ -257,6 +257,7 @@ bool LCodeGen::GeneratePrologue() { |
Comment(";;; Allocate local context"); |
bool need_write_barrier = true; |
// Argument to NewContext is the function, which is still in edi. |
+ DCHECK(!info()->scope()->is_script_scope()); |
if (heap_slots <= FastNewContextStub::kMaximumSlots) { |
FastNewContextStub stub(isolate(), heap_slots); |
__ CallStub(&stub); |