| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 * @param {!WebInspector.ConsoleMessage} message | 81 * @param {!WebInspector.ConsoleMessage} message |
| 82 * @return {?WebInspector.DebuggerModel.Location} | 82 * @return {?WebInspector.DebuggerModel.Location} |
| 83 */ | 83 */ |
| 84 _rawLocation: function(message) | 84 _rawLocation: function(message) |
| 85 { | 85 { |
| 86 var debuggerModel = WebInspector.DebuggerModel.fromTarget(message.target
()); | 86 var debuggerModel = WebInspector.DebuggerModel.fromTarget(message.target
()); |
| 87 if (!debuggerModel) | 87 if (!debuggerModel) |
| 88 return null; | 88 return null; |
| 89 var callFrame = message.stackTrace && message.stackTrace.callFrames ? me
ssage.stackTrace.callFrames[0] : null; | 89 var callFrame = message.stackTrace && message.stackTrace.callFrames ? me
ssage.stackTrace.callFrames[0] : null; |
| 90 // FIXME(62725): stack trace line/column numbers are one-based. | 90 // FIXME(62725): stack trace line/column numbers are one-based. |
| 91 var lineNumber = callFrame ? callFrame.lineNumber - 1 : message.line - 1
; | 91 var lineNumber = callFrame ? callFrame.lineNumber : message.line - 1; |
| 92 var columnNumber = message.column ? message.column - 1 : 0; | 92 var columnNumber = message.column ? message.column - 1 : 0; |
| 93 if (callFrame && callFrame.columnNumber) | 93 if (callFrame) |
| 94 columnNumber = callFrame.columnNumber - 1; | 94 columnNumber = callFrame.columnNumber; |
| 95 if (message.scriptId) | 95 if (message.scriptId) |
| 96 return debuggerModel.createRawLocationByScriptId(message.scriptId, l
ineNumber, columnNumber); | 96 return debuggerModel.createRawLocationByScriptId(message.scriptId, l
ineNumber, columnNumber); |
| 97 return debuggerModel.createRawLocationByURL(message.url || "", lineNumbe
r, columnNumber); | 97 return debuggerModel.createRawLocationByURL(message.url || "", lineNumbe
r, columnNumber); |
| 98 }, | 98 }, |
| 99 | 99 |
| 100 /** | 100 /** |
| 101 * @param {!WebInspector.ConsoleMessage} message | 101 * @param {!WebInspector.ConsoleMessage} message |
| 102 * @param {!WebInspector.DebuggerModel.Location} rawLocation | 102 * @param {!WebInspector.DebuggerModel.Location} rawLocation |
| 103 */ | 103 */ |
| 104 _addConsoleMessageToScript: function(message, rawLocation) | 104 _addConsoleMessageToScript: function(message, rawLocation) |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 | 191 |
| 192 dispose: function() | 192 dispose: function() |
| 193 { | 193 { |
| 194 if (this._uiMessage) | 194 if (this._uiMessage) |
| 195 this._uiMessage.remove(); | 195 this._uiMessage.remove(); |
| 196 } | 196 } |
| 197 } | 197 } |
| 198 | 198 |
| 199 /** @type {!WebInspector.PresentationConsoleMessageHelper} */ | 199 /** @type {!WebInspector.PresentationConsoleMessageHelper} */ |
| 200 WebInspector.presentationConsoleMessageHelper; | 200 WebInspector.presentationConsoleMessageHelper; |
| OLD | NEW |