Index: src/heap.cc |
diff --git a/src/heap.cc b/src/heap.cc |
index 5d75cb46fdf9cfd8d2fbedda8c2ae29caa2dd3f2..057c46029a4b9144f482ce7602e45692afa82b9e 100644 |
--- a/src/heap.cc |
+++ b/src/heap.cc |
@@ -4093,6 +4093,7 @@ MaybeObject* Heap::AllocateExternalArray(int length, |
MaybeObject* Heap::CreateCode(const CodeDesc& desc, |
Code::Flags flags, |
Handle<Object> self_reference, |
+ int prologue_offset, |
bool immovable, |
bool crankshafted) { |
// Allocate ByteArray before the Code object, so that we do not risk |
@@ -4144,10 +4145,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()) { |