| 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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 this._addConsoleMessageToScript(message, rawLocation); | 82 this._addConsoleMessageToScript(message, rawLocation); |
| 83 else | 83 else |
| 84 this._addPendingConsoleMessage(message); | 84 this._addPendingConsoleMessage(message); |
| 85 } | 85 } |
| 86 | 86 |
| 87 /** | 87 /** |
| 88 * @param {!ConsoleModel.ConsoleMessage} message | 88 * @param {!ConsoleModel.ConsoleMessage} message |
| 89 * @return {?SDK.DebuggerModel.Location} | 89 * @return {?SDK.DebuggerModel.Location} |
| 90 */ | 90 */ |
| 91 _rawLocation(message) { | 91 _rawLocation(message) { |
| 92 var debuggerModel = SDK.DebuggerModel.fromTarget(message.target()); | 92 if (!message.target()) |
| 93 return null; |
| 94 var debuggerModel = message.target().model(SDK.DebuggerModel); |
| 93 if (!debuggerModel) | 95 if (!debuggerModel) |
| 94 return null; | 96 return null; |
| 95 if (message.scriptId) | 97 if (message.scriptId) |
| 96 return debuggerModel.createRawLocationByScriptId(message.scriptId, message
.line, message.column); | 98 return debuggerModel.createRawLocationByScriptId(message.scriptId, message
.line, message.column); |
| 97 var callFrame = message.stackTrace && message.stackTrace.callFrames ? messag
e.stackTrace.callFrames[0] : null; | 99 var callFrame = message.stackTrace && message.stackTrace.callFrames ? messag
e.stackTrace.callFrames[0] : null; |
| 98 if (callFrame) { | 100 if (callFrame) { |
| 99 return debuggerModel.createRawLocationByScriptId( | 101 return debuggerModel.createRawLocationByScriptId( |
| 100 callFrame.scriptId, callFrame.lineNumber, callFrame.columnNumber); | 102 callFrame.scriptId, callFrame.lineNumber, callFrame.columnNumber); |
| 101 } | 103 } |
| 102 if (message.url) | 104 if (message.url) |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 } | 200 } |
| 199 | 201 |
| 200 dispose() { | 202 dispose() { |
| 201 if (this._uiMessage) | 203 if (this._uiMessage) |
| 202 this._uiMessage.remove(); | 204 this._uiMessage.remove(); |
| 203 } | 205 } |
| 204 }; | 206 }; |
| 205 | 207 |
| 206 /** @type {!Bindings.PresentationConsoleMessageHelper} */ | 208 /** @type {!Bindings.PresentationConsoleMessageHelper} */ |
| 207 Bindings.presentationConsoleMessageHelper; | 209 Bindings.presentationConsoleMessageHelper; |
| OLD | NEW |