| 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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 } | 144 } |
| 145 | 145 |
| 146 /** | 146 /** |
| 147 * @constructor | 147 * @constructor |
| 148 * @param {!WebInspector.ConsoleMessage} message | 148 * @param {!WebInspector.ConsoleMessage} message |
| 149 * @param {!WebInspector.DebuggerModel.Location} rawLocation | 149 * @param {!WebInspector.DebuggerModel.Location} rawLocation |
| 150 */ | 150 */ |
| 151 WebInspector.PresentationConsoleMessage = function(message, rawLocation) | 151 WebInspector.PresentationConsoleMessage = function(message, rawLocation) |
| 152 { | 152 { |
| 153 this.originalMessage = message; | 153 this.originalMessage = message; |
| 154 this._liveLocation = WebInspector.debuggerModel.createLiveLocation(rawLocati
on, this._updateLocation.bind(this)); | 154 this._liveLocation = rawLocation.createLiveLocation(this._updateLocation.bin
d(this)); |
| 155 } | 155 } |
| 156 | 156 |
| 157 WebInspector.PresentationConsoleMessage.prototype = { | 157 WebInspector.PresentationConsoleMessage.prototype = { |
| 158 /** | 158 /** |
| 159 * @param {!WebInspector.UILocation} uiLocation | 159 * @param {!WebInspector.UILocation} uiLocation |
| 160 */ | 160 */ |
| 161 _updateLocation: function(uiLocation) | 161 _updateLocation: function(uiLocation) |
| 162 { | 162 { |
| 163 if (this._uiLocation) | 163 if (this._uiLocation) |
| 164 this._uiLocation.uiSourceCode.consoleMessageRemoved(this); | 164 this._uiLocation.uiSourceCode.consoleMessageRemoved(this); |
| 165 this._uiLocation = uiLocation; | 165 this._uiLocation = uiLocation; |
| 166 this._uiLocation.uiSourceCode.consoleMessageAdded(this); | 166 this._uiLocation.uiSourceCode.consoleMessageAdded(this); |
| 167 }, | 167 }, |
| 168 | 168 |
| 169 get lineNumber() | 169 get lineNumber() |
| 170 { | 170 { |
| 171 return this._uiLocation.lineNumber; | 171 return this._uiLocation.lineNumber; |
| 172 }, | 172 }, |
| 173 | 173 |
| 174 dispose: function() | 174 dispose: function() |
| 175 { | 175 { |
| 176 this._liveLocation.dispose(); | 176 this._liveLocation.dispose(); |
| 177 } | 177 } |
| 178 } | 178 } |
| OLD | NEW |