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 1444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1455 to_index = request.arguments.toFrame; | 1455 to_index = request.arguments.toFrame; |
1456 } | 1456 } |
1457 if (request.arguments.bottom) { | 1457 if (request.arguments.bottom) { |
1458 var tmp_index = total_frames - from_index; | 1458 var tmp_index = total_frames - from_index; |
1459 from_index = total_frames - to_index | 1459 from_index = total_frames - to_index |
1460 to_index = tmp_index; | 1460 to_index = tmp_index; |
1461 } | 1461 } |
1462 if (from_index < 0 || to_index < 0) { | 1462 if (from_index < 0 || to_index < 0) { |
1463 return response.failed('Invalid frame number'); | 1463 return response.failed('Invalid frame number'); |
1464 } | 1464 } |
| 1465 if (request.arguments.compactFormat) { |
| 1466 response.setOption('compactFormat', true); |
| 1467 } |
1465 } | 1468 } |
1466 | 1469 |
1467 // Adjust the index. | 1470 // Adjust the index. |
1468 to_index = Math.min(total_frames, to_index); | 1471 to_index = Math.min(total_frames, to_index); |
1469 | 1472 |
1470 if (to_index <= from_index) { | 1473 if (to_index <= from_index) { |
1471 var error = 'Invalid frame range'; | 1474 var error = 'Invalid frame range'; |
1472 return response.failed(error); | 1475 return response.failed(error); |
1473 } | 1476 } |
1474 | 1477 |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1582 // Check for legal arguments. | 1585 // Check for legal arguments. |
1583 if (IS_UNDEFINED(handles)) { | 1586 if (IS_UNDEFINED(handles)) { |
1584 return response.failed('Argument "handles" missing'); | 1587 return response.failed('Argument "handles" missing'); |
1585 } | 1588 } |
1586 | 1589 |
1587 // Set 'includeSource' option for script lookup. | 1590 // Set 'includeSource' option for script lookup. |
1588 if (!IS_UNDEFINED(request.arguments.includeSource)) { | 1591 if (!IS_UNDEFINED(request.arguments.includeSource)) { |
1589 includeSource = %ToBoolean(request.arguments.includeSource); | 1592 includeSource = %ToBoolean(request.arguments.includeSource); |
1590 response.setOption('includeSource', includeSource); | 1593 response.setOption('includeSource', includeSource); |
1591 } | 1594 } |
| 1595 |
| 1596 if (request.arguments.compactFormat) { |
| 1597 response.setOption('compactFormat', true); |
| 1598 } |
1592 | 1599 |
1593 // Lookup handles. | 1600 // Lookup handles. |
1594 var mirrors = {}; | 1601 var mirrors = {}; |
1595 for (var i = 0; i < handles.length; i++) { | 1602 for (var i = 0; i < handles.length; i++) { |
1596 var handle = handles[i]; | 1603 var handle = handles[i]; |
1597 var mirror = LookupMirror(handle); | 1604 var mirror = LookupMirror(handle); |
1598 if (!mirror) { | 1605 if (!mirror) { |
1599 return response.failed('Object #' + handle + '# not found'); | 1606 return response.failed('Object #' + handle + '# not found'); |
1600 } | 1607 } |
1601 mirrors[handle] = mirror; | 1608 mirrors[handle] = mirror; |
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1867 case 'string': | 1874 case 'string': |
1868 case 'number': | 1875 case 'number': |
1869 json = value; | 1876 json = value; |
1870 break | 1877 break |
1871 | 1878 |
1872 default: | 1879 default: |
1873 json = null; | 1880 json = null; |
1874 } | 1881 } |
1875 return json; | 1882 return json; |
1876 } | 1883 } |
OLD | NEW |