| 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 1003 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1014 }; | 1014 }; |
| 1015 | 1015 |
| 1016 | 1016 |
| 1017 function MakeScriptObject_(script, include_source) { | 1017 function MakeScriptObject_(script, include_source) { |
| 1018 var o = { id: script.id(), | 1018 var o = { id: script.id(), |
| 1019 name: script.name(), | 1019 name: script.name(), |
| 1020 lineOffset: script.lineOffset(), | 1020 lineOffset: script.lineOffset(), |
| 1021 columnOffset: script.columnOffset(), | 1021 columnOffset: script.columnOffset(), |
| 1022 lineCount: script.lineCount(), | 1022 lineCount: script.lineCount(), |
| 1023 }; | 1023 }; |
| 1024 if (!IS_UNDEFINED(script.data())) { |
| 1025 o.data = script.data(); |
| 1026 } |
| 1024 if (include_source) { | 1027 if (include_source) { |
| 1025 o.source = script.source(); | 1028 o.source = script.source(); |
| 1026 } | 1029 } |
| 1027 return o; | 1030 return o; |
| 1028 }; | 1031 }; |
| 1029 | 1032 |
| 1030 | 1033 |
| 1031 function DebugCommandProcessor(exec_state) { | 1034 function DebugCommandProcessor(exec_state) { |
| 1032 this.exec_state_ = exec_state; | 1035 this.exec_state_ = exec_state; |
| 1033 this.running_ = false; | 1036 this.running_ = false; |
| (...skipping 638 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1672 for (var i = 0; i < scripts.length; i++) { | 1675 for (var i = 0; i < scripts.length; i++) { |
| 1673 if (types & ScriptTypeFlag(scripts[i].type)) { | 1676 if (types & ScriptTypeFlag(scripts[i].type)) { |
| 1674 var script = {}; | 1677 var script = {}; |
| 1675 if (scripts[i].name) { | 1678 if (scripts[i].name) { |
| 1676 script.name = scripts[i].name; | 1679 script.name = scripts[i].name; |
| 1677 } | 1680 } |
| 1678 script.id = scripts[i].id; | 1681 script.id = scripts[i].id; |
| 1679 script.lineOffset = scripts[i].line_offset; | 1682 script.lineOffset = scripts[i].line_offset; |
| 1680 script.columnOffset = scripts[i].column_offset; | 1683 script.columnOffset = scripts[i].column_offset; |
| 1681 script.lineCount = scripts[i].lineCount(); | 1684 script.lineCount = scripts[i].lineCount(); |
| 1685 if (scripts[i].data) { |
| 1686 script.data = scripts[i].data; |
| 1687 } |
| 1682 if (includeSource) { | 1688 if (includeSource) { |
| 1683 script.source = scripts[i].source; | 1689 script.source = scripts[i].source; |
| 1684 } else { | 1690 } else { |
| 1685 script.sourceStart = scripts[i].source.substring(0, 80); | 1691 script.sourceStart = scripts[i].source.substring(0, 80); |
| 1686 } | 1692 } |
| 1687 script.sourceLength = scripts[i].source.length; | 1693 script.sourceLength = scripts[i].source.length; |
| 1688 script.type = scripts[i].type; | 1694 script.type = scripts[i].type; |
| 1689 response.body.push(script); | 1695 response.body.push(script); |
| 1690 } | 1696 } |
| 1691 } | 1697 } |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1848 json += NumberToJSON_(elem); | 1854 json += NumberToJSON_(elem); |
| 1849 } else if (IS_STRING(elem)) { | 1855 } else if (IS_STRING(elem)) { |
| 1850 json += StringToJSON_(elem); | 1856 json += StringToJSON_(elem); |
| 1851 } else { | 1857 } else { |
| 1852 json += elem; | 1858 json += elem; |
| 1853 } | 1859 } |
| 1854 } | 1860 } |
| 1855 json += ']'; | 1861 json += ']'; |
| 1856 return json; | 1862 return json; |
| 1857 } | 1863 } |
| OLD | NEW |