| Index: src/debug/debug.cc
|
| diff --git a/src/debug/debug.cc b/src/debug/debug.cc
|
| index b701cb0c5d81c8a354d7bdbf8bfaad63dfbeb5f0..33f0834f2e06ebaebd7ee2b6da1fe90c10111440 100644
|
| --- a/src/debug/debug.cc
|
| +++ b/src/debug/debug.cc
|
| @@ -186,6 +186,7 @@
|
| mask |= RelocInfo::ModeMask(RelocInfo::DEBUG_BREAK_SLOT_AT_CALL);
|
| mask |= RelocInfo::ModeMask(RelocInfo::DEBUG_BREAK_SLOT_AT_TAIL_CALL);
|
| mask |= RelocInfo::ModeMask(RelocInfo::DEBUG_BREAK_SLOT_AT_POSITION);
|
| + mask |= RelocInfo::ModeMask(RelocInfo::DEBUGGER_STATEMENT);
|
| return mask;
|
| }
|
|
|
| @@ -210,7 +211,8 @@
|
| source_position_iterator_.Advance();
|
| }
|
|
|
| - DCHECK(RelocInfo::IsDebugBreakSlot(rmode()));
|
| + DCHECK(RelocInfo::IsDebugBreakSlot(rmode()) ||
|
| + RelocInfo::IsDebuggerStatement(rmode()));
|
| break_index_++;
|
| }
|
|
|
| @@ -223,6 +225,8 @@
|
| return isolate()->is_tail_call_elimination_enabled()
|
| ? DEBUG_BREAK_SLOT_AT_TAIL_CALL
|
| : DEBUG_BREAK_SLOT_AT_CALL;
|
| + } else if (RelocInfo::IsDebuggerStatement(rmode())) {
|
| + return DEBUGGER_STATEMENT;
|
| } else if (RelocInfo::IsDebugBreakSlot(rmode())) {
|
| return DEBUG_BREAK_SLOT;
|
| } else {
|
| @@ -238,6 +242,7 @@
|
|
|
| void CodeBreakIterator::SetDebugBreak() {
|
| DebugBreakType debug_break_type = GetDebugBreakType();
|
| + if (debug_break_type == DEBUGGER_STATEMENT) return;
|
| DCHECK(debug_break_type >= DEBUG_BREAK_SLOT);
|
| Builtins* builtins = isolate()->builtins();
|
| Handle<Code> target = debug_break_type == DEBUG_BREAK_SLOT_AT_RETURN
|
| @@ -247,12 +252,16 @@
|
| }
|
|
|
| void CodeBreakIterator::ClearDebugBreak() {
|
| - DCHECK(GetDebugBreakType() >= DEBUG_BREAK_SLOT);
|
| + DebugBreakType debug_break_type = GetDebugBreakType();
|
| + if (debug_break_type == DEBUGGER_STATEMENT) return;
|
| + DCHECK(debug_break_type >= DEBUG_BREAK_SLOT);
|
| DebugCodegen::ClearDebugBreakSlot(isolate(), rinfo()->pc());
|
| }
|
|
|
| bool CodeBreakIterator::IsDebugBreak() {
|
| - DCHECK(GetDebugBreakType() >= DEBUG_BREAK_SLOT);
|
| + DebugBreakType debug_break_type = GetDebugBreakType();
|
| + if (debug_break_type == DEBUGGER_STATEMENT) return false;
|
| + DCHECK(debug_break_type >= DEBUG_BREAK_SLOT);
|
| return DebugCodegen::DebugBreakSlotIsPatched(rinfo()->pc());
|
| }
|
|
|
|
|