OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
288 return this.column_; | 288 return this.column_; |
289 }; | 289 }; |
290 | 290 |
291 | 291 |
292 ScriptBreakPoint.prototype.update_positions = function(line, column) { | 292 ScriptBreakPoint.prototype.update_positions = function(line, column) { |
293 this.line_ = line; | 293 this.line_ = line; |
294 this.column_ = column; | 294 this.column_ = column; |
295 } | 295 } |
296 | 296 |
297 | 297 |
298 | |
299 ScriptBreakPoint.prototype.hit_count = function() { | 298 ScriptBreakPoint.prototype.hit_count = function() { |
300 return this.hit_count_; | 299 return this.hit_count_; |
301 }; | 300 }; |
302 | 301 |
303 | 302 |
304 ScriptBreakPoint.prototype.active = function() { | 303 ScriptBreakPoint.prototype.active = function() { |
305 return this.active_; | 304 return this.active_; |
306 }; | 305 }; |
307 | 306 |
308 | 307 |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
382 // Convert the line and column into an absolute position within the script. | 381 // Convert the line and column into an absolute position within the script. |
383 var pos = Debug.findScriptSourcePosition(script, this.line(), column); | 382 var pos = Debug.findScriptSourcePosition(script, this.line(), column); |
384 | 383 |
385 // If the position is not found in the script (the script might be shorter | 384 // If the position is not found in the script (the script might be shorter |
386 // than it used to be) just ignore it. | 385 // than it used to be) just ignore it. |
387 if (pos === null) return; | 386 if (pos === null) return; |
388 | 387 |
389 // Create a break point object and set the break point. | 388 // Create a break point object and set the break point. |
390 break_point = MakeBreakPoint(pos, this.line(), this.column(), this); | 389 break_point = MakeBreakPoint(pos, this.line(), this.column(), this); |
391 break_point.setIgnoreCount(this.ignoreCount()); | 390 break_point.setIgnoreCount(this.ignoreCount()); |
392 %SetScriptBreakPoint(script, pos, break_point); | 391 pos = %SetScriptBreakPoint(script, pos, break_point); |
| 392 if (!IS_UNDEFINED(pos)) { |
| 393 this.actual_location = script.locationFromPosition(pos); |
| 394 } |
393 | 395 |
394 return break_point; | 396 return break_point; |
395 }; | 397 }; |
396 | 398 |
397 | 399 |
398 // Clear all the break points created from this script break point | 400 // Clear all the break points created from this script break point |
399 ScriptBreakPoint.prototype.clear = function () { | 401 ScriptBreakPoint.prototype.clear = function () { |
400 var remaining_break_points = []; | 402 var remaining_break_points = []; |
401 for (var i = 0; i < break_points.length; i++) { | 403 for (var i = 0; i < break_points.length; i++) { |
402 if (break_points[i].script_break_point() && | 404 if (break_points[i].script_break_point() && |
(...skipping 1788 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2191 case 'string': | 2193 case 'string': |
2192 case 'number': | 2194 case 'number': |
2193 json = value; | 2195 json = value; |
2194 break | 2196 break |
2195 | 2197 |
2196 default: | 2198 default: |
2197 json = null; | 2199 json = null; |
2198 } | 2200 } |
2199 return json; | 2201 return json; |
2200 } | 2202 } |
OLD | NEW |