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 870 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
881 result += lines[num]; | 881 result += lines[num]; |
882 result += '\n'; | 882 result += '\n'; |
883 } | 883 } |
884 details.text = result; | 884 details.text = result; |
885 break; | 885 break; |
886 | 886 |
887 case 'scripts': | 887 case 'scripts': |
888 var result = ''; | 888 var result = ''; |
889 for (i = 0; i < body.length; i++) { | 889 for (i = 0; i < body.length; i++) { |
890 if (i != 0) result += '\n'; | 890 if (i != 0) result += '\n'; |
| 891 if (body[i].id) { |
| 892 result += body[i].id; |
| 893 } else { |
| 894 result += '[no id]'; |
| 895 } |
| 896 result += ', '; |
891 if (body[i].name) { | 897 if (body[i].name) { |
892 result += body[i].name; | 898 result += body[i].name; |
893 } else { | 899 } else { |
894 result += '[unnamed] '; | 900 result += '[unnamed] '; |
895 var sourceStart = body[i].sourceStart; | |
896 if (sourceStart.length > 40) { | |
897 sourceStart = sourceStart.substring(0, 37) + '...'; | |
898 } | |
899 result += sourceStart; | |
900 } | 901 } |
901 result += ' (lines: '; | 902 result += ' (lines: '; |
902 result += body[i].sourceLines; | 903 result += body[i].lineCount; |
903 result += ', length: '; | 904 result += ', length: '; |
904 result += body[i].sourceLength; | 905 result += body[i].sourceLength; |
905 if (body[i].type == Debug.ScriptType.Native) { | 906 if (body[i].type == Debug.ScriptType.Native) { |
906 result += ', native'; | 907 result += ', native'; |
907 } else if (body[i].type == Debug.ScriptType.Extension) { | 908 } else if (body[i].type == Debug.ScriptType.Extension) { |
908 result += ', extension'; | 909 result += ', extension'; |
909 } | 910 } |
910 result += ')'; | 911 result += '), ['; |
| 912 var sourceStart = body[i].sourceStart; |
| 913 if (sourceStart.length > 40) { |
| 914 sourceStart = sourceStart.substring(0, 37) + '...'; |
| 915 } |
| 916 result += sourceStart; |
| 917 result += ']'; |
911 } | 918 } |
912 details.text = result; | 919 details.text = result; |
913 break; | 920 break; |
914 | 921 |
915 case 'continue': | 922 case 'continue': |
916 details.text = "(running)"; | 923 details.text = "(running)"; |
917 break; | 924 break; |
918 | 925 |
919 default: | 926 default: |
920 details.text = | 927 details.text = |
(...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1394 json += NumberToJSON_(elem); | 1401 json += NumberToJSON_(elem); |
1395 } else if (typeof(elem) === 'string') { | 1402 } else if (typeof(elem) === 'string') { |
1396 json += StringToJSON_(elem); | 1403 json += StringToJSON_(elem); |
1397 } else { | 1404 } else { |
1398 json += elem; | 1405 json += elem; |
1399 } | 1406 } |
1400 } | 1407 } |
1401 json += ']'; | 1408 json += ']'; |
1402 return json; | 1409 return json; |
1403 } | 1410 } |
OLD | NEW |