| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2009 Joseph Pecoraro | 3 * Copyright (C) 2009 Joseph Pecoraro |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * | 8 * |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 787 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 798 } | 798 } |
| 799 | 799 |
| 800 if (result.type !== "function") { | 800 if (result.type !== "function") { |
| 801 addMessage(); | 801 addMessage(); |
| 802 return; | 802 return; |
| 803 } | 803 } |
| 804 | 804 |
| 805 result.functionDetails(didGetDetails); | 805 result.functionDetails(didGetDetails); |
| 806 | 806 |
| 807 /** | 807 /** |
| 808 * @param {?DebuggerAgent.FunctionDetails} response | 808 * @param {?WebInspector.DebuggerModel.FunctionDetails} response |
| 809 */ | 809 */ |
| 810 function didGetDetails(response) | 810 function didGetDetails(response) |
| 811 { | 811 { |
| 812 if (!response) { | 812 if (!response || !response.location) { |
| 813 addMessage(); | 813 addMessage(); |
| 814 return; | 814 return; |
| 815 } | 815 } |
| 816 | 816 |
| 817 var url; | 817 var url; |
| 818 var lineNumber; | |
| 819 var columnNumber; | |
| 820 var script = target.debuggerModel.scriptForId(response.location.scri
ptId); | 818 var script = target.debuggerModel.scriptForId(response.location.scri
ptId); |
| 821 if (script && script.sourceURL) { | 819 if (script && script.sourceURL) |
| 822 url = script.sourceURL; | 820 url = script.sourceURL; |
| 823 lineNumber = response.location.lineNumber + 1; | |
| 824 columnNumber = response.location.columnNumber + 1; | |
| 825 } | |
| 826 // FIXME: this should be using live location. | 821 // FIXME: this should be using live location. |
| 827 addMessage(url, lineNumber, columnNumber); | 822 addMessage(url, response.location.lineNumber, response.location.colu
mnNumber); |
| 828 } | 823 } |
| 829 }, | 824 }, |
| 830 | 825 |
| 831 /** | 826 /** |
| 832 * @param {string} text | 827 * @param {string} text |
| 833 * @param {boolean} useCommandLineAPI | 828 * @param {boolean} useCommandLineAPI |
| 834 */ | 829 */ |
| 835 _appendCommand: function(text, useCommandLineAPI) | 830 _appendCommand: function(text, useCommandLineAPI) |
| 836 { | 831 { |
| 837 | 832 |
| (...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1217 WebInspector.ConsoleView.ShowConsoleActionDelegate.prototype = { | 1212 WebInspector.ConsoleView.ShowConsoleActionDelegate.prototype = { |
| 1218 /** | 1213 /** |
| 1219 * @return {boolean} | 1214 * @return {boolean} |
| 1220 */ | 1215 */ |
| 1221 handleAction: function() | 1216 handleAction: function() |
| 1222 { | 1217 { |
| 1223 WebInspector.consoleModel.show(); | 1218 WebInspector.consoleModel.show(); |
| 1224 return true; | 1219 return true; |
| 1225 } | 1220 } |
| 1226 } | 1221 } |
| OLD | NEW |