OLD | NEW |
1 // Copyright 2008 the V8 project authors. All rights reserved. | 1 // Copyright 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 959 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
970 pos = args.indexOf(' '); | 970 pos = args.indexOf(' '); |
971 if (pos > 0) { | 971 if (pos > 0) { |
972 target = args.substring(0, pos); | 972 target = args.substring(0, pos); |
973 condition = args.substring(pos + 1, args.length); | 973 condition = args.substring(pos + 1, args.length); |
974 } | 974 } |
975 | 975 |
976 // Check for script breakpoint (name:line[:column]). If no ':' in break | 976 // Check for script breakpoint (name:line[:column]). If no ':' in break |
977 // specification it is considered a function break point. | 977 // specification it is considered a function break point. |
978 pos = target.indexOf(':'); | 978 pos = target.indexOf(':'); |
979 if (pos > 0) { | 979 if (pos > 0) { |
980 type = 'script'; | |
981 var tmp = target.substring(pos + 1, target.length); | 980 var tmp = target.substring(pos + 1, target.length); |
982 target = target.substring(0, pos); | 981 target = target.substring(0, pos); |
| 982 if (target[0] == '/' && target[target.length - 1] == '/') { |
| 983 type = 'scriptRegExp'; |
| 984 target = target.substring(1, target.length - 1); |
| 985 } else { |
| 986 type = 'script'; |
| 987 } |
983 | 988 |
984 // Check for both line and column. | 989 // Check for both line and column. |
985 pos = tmp.indexOf(':'); | 990 pos = tmp.indexOf(':'); |
986 if (pos > 0) { | 991 if (pos > 0) { |
987 column = parseInt(tmp.substring(pos + 1, tmp.length)) - 1; | 992 column = parseInt(tmp.substring(pos + 1, tmp.length)) - 1; |
988 line = parseInt(tmp.substring(0, pos)) - 1; | 993 line = parseInt(tmp.substring(0, pos)) - 1; |
989 } else { | 994 } else { |
990 line = parseInt(tmp) - 1; | 995 line = parseInt(tmp) - 1; |
991 } | 996 } |
992 } else if (target[0] == '#' && target[target.length - 1] == '#') { | 997 } else if (target[0] == '#' && target[target.length - 1] == '#') { |
(...skipping 984 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1977 for (var i = 0; i < body.breakpoints.length; i++) { | 1982 for (var i = 0; i < body.breakpoints.length; i++) { |
1978 var breakpoint = body.breakpoints[i]; | 1983 var breakpoint = body.breakpoints[i]; |
1979 result += '\n id=' + breakpoint.number; | 1984 result += '\n id=' + breakpoint.number; |
1980 result += ' type=' + breakpoint.type; | 1985 result += ' type=' + breakpoint.type; |
1981 if (breakpoint.script_id) { | 1986 if (breakpoint.script_id) { |
1982 result += ' script_id=' + breakpoint.script_id; | 1987 result += ' script_id=' + breakpoint.script_id; |
1983 } | 1988 } |
1984 if (breakpoint.script_name) { | 1989 if (breakpoint.script_name) { |
1985 result += ' script_name=' + breakpoint.script_name; | 1990 result += ' script_name=' + breakpoint.script_name; |
1986 } | 1991 } |
| 1992 if (breakpoint.script_regexp) { |
| 1993 result += ' script_regexp=' + breakpoint.script_regexp; |
| 1994 } |
1987 result += ' line=' + (breakpoint.line + 1); | 1995 result += ' line=' + (breakpoint.line + 1); |
1988 if (breakpoint.column != null) { | 1996 if (breakpoint.column != null) { |
1989 result += ' column=' + (breakpoint.column + 1); | 1997 result += ' column=' + (breakpoint.column + 1); |
1990 } | 1998 } |
1991 if (breakpoint.groupId) { | 1999 if (breakpoint.groupId) { |
1992 result += ' groupId=' + breakpoint.groupId; | 2000 result += ' groupId=' + breakpoint.groupId; |
1993 } | 2001 } |
1994 if (breakpoint.ignoreCount) { | 2002 if (breakpoint.ignoreCount) { |
1995 result += ' ignoreCount=' + breakpoint.ignoreCount; | 2003 result += ' ignoreCount=' + breakpoint.ignoreCount; |
1996 } | 2004 } |
(...skipping 792 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2789 json += NumberToJSON_(elem); | 2797 json += NumberToJSON_(elem); |
2790 } else if (typeof(elem) === 'string') { | 2798 } else if (typeof(elem) === 'string') { |
2791 json += StringToJSON_(elem); | 2799 json += StringToJSON_(elem); |
2792 } else { | 2800 } else { |
2793 json += elem; | 2801 json += elem; |
2794 } | 2802 } |
2795 } | 2803 } |
2796 json += ']'; | 2804 json += ']'; |
2797 return json; | 2805 return json; |
2798 } | 2806 } |
OLD | NEW |