Chromium Code Reviews| Index: src/debug-debugger.js |
| diff --git a/src/debug-debugger.js b/src/debug-debugger.js |
| index 7787312ddc68ead51e24738a512d6affda2f4501..180717ecf2dda9cf9108399cf89cb36385a87b7d 100644 |
| --- a/src/debug-debugger.js |
| +++ b/src/debug-debugger.js |
| @@ -251,7 +251,7 @@ function IsBreakPointTriggered(break_id, break_point) { |
| // script name or script id and the break point is represented as line and |
| // column. |
| function ScriptBreakPoint(type, script_id_or_name, opt_line, opt_column, |
| - opt_groupId) { |
| + opt_groupId, opt_statement_aligned) { |
| this.type_ = type; |
| if (type == Debug.ScriptBreakPointType.ScriptId) { |
| this.script_id_ = script_id_or_name; |
| @@ -265,6 +265,7 @@ function ScriptBreakPoint(type, script_id_or_name, opt_line, opt_column, |
| this.line_ = opt_line || 0; |
| this.column_ = opt_column; |
| this.groupId_ = opt_groupId; |
| + this.statement_aligned_ = opt_statement_aligned !== false; |
| this.hit_count_ = 0; |
| this.active_ = true; |
| this.condition_ = null; |
| @@ -276,7 +277,7 @@ function ScriptBreakPoint(type, script_id_or_name, opt_line, opt_column, |
| //Creates a clone of script breakpoint that is linked to another script. |
| ScriptBreakPoint.prototype.cloneForOtherScript = function (other_script) { |
| var copy = new ScriptBreakPoint(Debug.ScriptBreakPointType.ScriptId, |
| - other_script.id, this.line_, this.column_, this.groupId_); |
| + other_script.id, this.line_, this.column_, this.groupId_, this.statement_aligned_); |
|
Yang
2013/06/25 11:32:00
80 char limit
Peter.Rybin
2013/06/27 14:07:29
Done.
|
| copy.number_ = next_break_point_number++; |
| script_break_points.push(copy); |
| @@ -443,7 +444,7 @@ ScriptBreakPoint.prototype.set = function (script) { |
| // Create a break point object and set the break point. |
| break_point = MakeBreakPoint(position, this); |
| break_point.setIgnoreCount(this.ignoreCount()); |
| - var actual_position = %SetScriptBreakPoint(script, position, break_point); |
| + var actual_position = %SetScriptBreakPoint(script, position, this.statement_aligned_, break_point); |
|
Yang
2013/06/25 11:32:00
80 char limit
Peter.Rybin
2013/06/27 14:07:29
Done.
|
| if (IS_UNDEFINED(actual_position)) { |
| actual_position = position; |
| } |
| @@ -685,7 +686,7 @@ Debug.setBreakPointByScriptIdAndPosition = function(script_id, position, |
| for (var i = 0; i < scripts.length; i++) { |
| if (script_id == scripts[i].id) { |
| break_point.actual_position = %SetScriptBreakPoint(scripts[i], position, |
| - break_point); |
| + true, break_point); |
| break; |
| } |
| } |
| @@ -780,11 +781,11 @@ Debug.findScriptBreakPoint = function(break_point_number, remove) { |
| // specified source line and column within that line. |
| Debug.setScriptBreakPoint = function(type, script_id_or_name, |
| opt_line, opt_column, opt_condition, |
| - opt_groupId) { |
| + opt_groupId, opt_statement_aligned) { |
| // Create script break point object. |
| var script_break_point = |
| new ScriptBreakPoint(type, script_id_or_name, opt_line, opt_column, |
| - opt_groupId); |
| + opt_groupId, opt_statement_aligned); |
| // Assign number to the new script break point and add it. |
| script_break_point.number_ = next_break_point_number++; |
| @@ -806,10 +807,10 @@ Debug.setScriptBreakPoint = function(type, script_id_or_name, |
| Debug.setScriptBreakPointById = function(script_id, |
| opt_line, opt_column, |
| - opt_condition, opt_groupId) { |
| + opt_condition, opt_groupId, opt_statement_aligned) { |
|
Yang
2013/06/25 11:32:00
80 char limit
Peter.Rybin
2013/06/27 14:07:29
Done.
|
| return this.setScriptBreakPoint(Debug.ScriptBreakPointType.ScriptId, |
| script_id, opt_line, opt_column, |
| - opt_condition, opt_groupId); |
| + opt_condition, opt_groupId, opt_statement_aligned); |
|
Yang
2013/06/25 11:32:00
80 char limit
Peter.Rybin
2013/06/27 14:07:29
Done.
|
| }; |