Index: src/heap.cc |
diff --git a/src/heap.cc b/src/heap.cc |
index fd5504ffe27a5fa347a8024e17ea72c3d3793273..1852b1e3c6fcf3c68f5e8b3fd1bc4798f1447367 100644 |
--- a/src/heap.cc |
+++ b/src/heap.cc |
@@ -4140,7 +4140,8 @@ MaybeObject* Heap::CreateCode(const CodeDesc& desc, |
Code::Flags flags, |
Handle<Object> self_reference, |
bool immovable, |
- bool crankshafted) { |
+ bool crankshafted, |
+ int prologue_offset) { |
// Allocate ByteArray before the Code object, so that we do not risk |
// leaving uninitialized Code object (and breaking the heap). |
ByteArray* reloc_info; |
@@ -4190,10 +4191,18 @@ MaybeObject* Heap::CreateCode(const CodeDesc& desc, |
code->set_handler_table(empty_fixed_array(), SKIP_WRITE_BARRIER); |
code->set_gc_metadata(Smi::FromInt(0)); |
code->set_ic_age(global_ic_age_); |
- code->set_prologue_offset(kPrologueOffsetNotSet); |
+ code->set_prologue_offset(prologue_offset); |
if (code->kind() == Code::OPTIMIZED_FUNCTION) { |
code->set_marked_for_deoptimization(false); |
} |
+ |
+#ifdef ENABLE_DEBUGGER_SUPPORT |
+ if (code->kind() == Code::FUNCTION) { |
+ code->set_has_debug_break_slots( |
+ isolate_->debugger()->IsDebuggerActive()); |
+ } |
+#endif |
+ |
// Allow self references to created code object by patching the handle to |
// point to the newly allocated Code object. |
if (!self_reference.is_null()) { |