Index: src/code-stubs.cc |
=================================================================== |
--- src/code-stubs.cc (revision 7090) |
+++ src/code-stubs.cc (working copy) |
@@ -101,7 +101,8 @@ |
static_cast<Code::Kind>(GetCodeKind()), |
InLoop(), |
GetICState()); |
- Handle<Code> new_object = Factory::NewCode(desc, flags, masm.CodeObject()); |
+ Handle<Code> new_object = Factory::NewCode( |
+ desc, flags, masm.CodeObject(), NeedsImmovableCode()); |
RecordCodeGeneration(*new_object, &masm); |
FinishCode(*new_object); |
@@ -116,6 +117,7 @@ |
code = *new_object; |
} |
+ ASSERT(!NeedsImmovableCode() || Heap::lo_space()->Contains(code)); |
return Handle<Code>(code); |
} |