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 1341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1352 }; | 1352 }; |
1353 | 1353 |
1354 | 1354 |
1355 FrameMirror.prototype.sourcePosition = function() { | 1355 FrameMirror.prototype.sourcePosition = function() { |
1356 return this.details_.sourcePosition(); | 1356 return this.details_.sourcePosition(); |
1357 }; | 1357 }; |
1358 | 1358 |
1359 | 1359 |
1360 FrameMirror.prototype.sourceLocation = function() { | 1360 FrameMirror.prototype.sourceLocation = function() { |
1361 if (this.func().resolved() && this.func().script()) { | 1361 if (this.func().resolved() && this.func().script()) { |
1362 return this.func().script().locationFromPosition(this.sourcePosition()); | 1362 return this.func().script().locationFromPosition(this.sourcePosition(), |
| 1363 true); |
1363 } | 1364 } |
1364 }; | 1365 }; |
1365 | 1366 |
1366 | 1367 |
1367 FrameMirror.prototype.sourceLine = function() { | 1368 FrameMirror.prototype.sourceLine = function() { |
1368 if (this.func().resolved()) { | 1369 if (this.func().resolved()) { |
1369 var location = this.sourceLocation(); | 1370 var location = this.sourceLocation(); |
1370 if (location) { | 1371 if (location) { |
1371 return location.line; | 1372 return location.line; |
1372 } | 1373 } |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1554 ScriptMirror.prototype.value = function() { | 1555 ScriptMirror.prototype.value = function() { |
1555 return this.script_; | 1556 return this.script_; |
1556 }; | 1557 }; |
1557 | 1558 |
1558 | 1559 |
1559 ScriptMirror.prototype.name = function() { | 1560 ScriptMirror.prototype.name = function() { |
1560 return this.script_.name; | 1561 return this.script_.name; |
1561 }; | 1562 }; |
1562 | 1563 |
1563 | 1564 |
| 1565 ScriptMirror.prototype.id = function() { |
| 1566 return this.script_.id; |
| 1567 }; |
| 1568 |
| 1569 |
1564 ScriptMirror.prototype.source = function() { | 1570 ScriptMirror.prototype.source = function() { |
1565 return this.script_.source; | 1571 return this.script_.source; |
1566 }; | 1572 }; |
1567 | 1573 |
1568 | 1574 |
1569 ScriptMirror.prototype.lineOffset = function() { | 1575 ScriptMirror.prototype.lineOffset = function() { |
1570 return this.script_.line_offset; | 1576 return this.script_.line_offset; |
1571 }; | 1577 }; |
1572 | 1578 |
1573 | 1579 |
(...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2067 /** | 2073 /** |
2068 * Convert a Date to ISO 8601 format. To avoid depending on the Date object | 2074 * Convert a Date to ISO 8601 format. To avoid depending on the Date object |
2069 * this method calls the functions in date.js directly and not through the | 2075 * this method calls the functions in date.js directly and not through the |
2070 * value. | 2076 * value. |
2071 * @param {Date} value The Date value to format as JSON | 2077 * @param {Date} value The Date value to format as JSON |
2072 * @return {string} JSON formatted Date value | 2078 * @return {string} JSON formatted Date value |
2073 */ | 2079 */ |
2074 function DateToJSON_(value) { | 2080 function DateToJSON_(value) { |
2075 return '"' + DateToISO8601_(value) + '"'; | 2081 return '"' + DateToISO8601_(value) + '"'; |
2076 } | 2082 } |
OLD | NEW |