OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
441 source_line.match(sourceLineBeginningSkip)[0].length; | 441 source_line.match(sourceLineBeginningSkip)[0].length; |
442 } | 442 } |
443 column = script.sourceColumnStart_[line]; | 443 column = script.sourceColumnStart_[line]; |
444 } | 444 } |
445 | 445 |
446 // Convert the line and column into an absolute position within the script. | 446 // Convert the line and column into an absolute position within the script. |
447 var position = Debug.findScriptSourcePosition(script, this.line(), column); | 447 var position = Debug.findScriptSourcePosition(script, this.line(), column); |
448 | 448 |
449 // If the position is not found in the script (the script might be shorter | 449 // If the position is not found in the script (the script might be shorter |
450 // than it used to be) just ignore it. | 450 // than it used to be) just ignore it. |
451 if (position === null) return; | 451 if (IS_NULL(position)) return; |
452 | 452 |
453 // Create a break point object and set the break point. | 453 // Create a break point object and set the break point. |
454 break_point = MakeBreakPoint(position, this); | 454 break_point = MakeBreakPoint(position, this); |
455 break_point.setIgnoreCount(this.ignoreCount()); | 455 break_point.setIgnoreCount(this.ignoreCount()); |
456 var actual_position = %SetScriptBreakPoint(script, position, | 456 var actual_position = %SetScriptBreakPoint(script, position, |
457 this.position_alignment_, | 457 this.position_alignment_, |
458 break_point); | 458 break_point); |
459 if (IS_UNDEFINED(actual_position)) { | 459 if (IS_UNDEFINED(actual_position)) { |
460 actual_position = position; | 460 actual_position = position; |
461 } | 461 } |
(...skipping 1595 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2057 } else if (value_description.type == NUMBER_TYPE) { | 2057 } else if (value_description.type == NUMBER_TYPE) { |
2058 return Number(value_description.stringDescription); | 2058 return Number(value_description.stringDescription); |
2059 } if (value_description.type == STRING_TYPE) { | 2059 } if (value_description.type == STRING_TYPE) { |
2060 return String(value_description.stringDescription); | 2060 return String(value_description.stringDescription); |
2061 } else { | 2061 } else { |
2062 throw new Error("Unknown type"); | 2062 throw new Error("Unknown type"); |
2063 } | 2063 } |
2064 } else if ("value" in value_description) { | 2064 } else if ("value" in value_description) { |
2065 return value_description.value; | 2065 return value_description.value; |
2066 } else if (value_description.type == UNDEFINED_TYPE) { | 2066 } else if (value_description.type == UNDEFINED_TYPE) { |
2067 return void 0; | 2067 return UNDEFINED; |
2068 } else if (value_description.type == NULL_TYPE) { | 2068 } else if (value_description.type == NULL_TYPE) { |
2069 return null; | 2069 return null; |
2070 } else { | 2070 } else { |
2071 throw new Error("Failed to parse value description"); | 2071 throw new Error("Failed to parse value description"); |
2072 } | 2072 } |
2073 }; | 2073 }; |
2074 | 2074 |
2075 | 2075 |
2076 DebugCommandProcessor.prototype.setVariableValueRequest_ = | 2076 DebugCommandProcessor.prototype.setVariableValueRequest_ = |
2077 function(request, response) { | 2077 function(request, response) { |
(...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2634 | 2634 |
2635 default: | 2635 default: |
2636 json = null; | 2636 json = null; |
2637 } | 2637 } |
2638 return json; | 2638 return json; |
2639 } | 2639 } |
2640 | 2640 |
2641 Debug.TestApi = { | 2641 Debug.TestApi = { |
2642 CommandProcessorResolveValue: DebugCommandProcessor.resolveValue_ | 2642 CommandProcessorResolveValue: DebugCommandProcessor.resolveValue_ |
2643 }; | 2643 }; |
OLD | NEW |