| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 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 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 219 this.url = url || null; | 219 this.url = url || null; |
| 220 this.line = line || 0; | 220 this.line = line || 0; |
| 221 this.column = column || 0; | 221 this.column = column || 0; |
| 222 this.parameters = parameters; | 222 this.parameters = parameters; |
| 223 this.stackTrace = stackTrace; | 223 this.stackTrace = stackTrace; |
| 224 this.timestamp = timestamp || Date.now(); | 224 this.timestamp = timestamp || Date.now(); |
| 225 this.isOutdated = isOutdated; | 225 this.isOutdated = isOutdated; |
| 226 this.executionContextId = executionContextId || 0; | 226 this.executionContextId = executionContextId || 0; |
| 227 | 227 |
| 228 this.request = requestId ? target.networkLog.requestForId(requestId) : null; | 228 this.request = requestId ? target.networkLog.requestForId(requestId) : null; |
| 229 |
| 230 if (this.request) { |
| 231 this.stackTrace = this.request.initiator.stackTrace; |
| 232 if (this.request.initiator && this.request.initiator.url) { |
| 233 this.url = this.request.initiator.url; |
| 234 this.line = this.request.initiator.lineNumber; |
| 235 } |
| 236 } |
| 229 } | 237 } |
| 230 | 238 |
| 231 WebInspector.ConsoleMessage.prototype = { | 239 WebInspector.ConsoleMessage.prototype = { |
| 232 /** | 240 /** |
| 233 * @param {!WebInspector.ConsoleMessage} originatingMessage | 241 * @param {!WebInspector.ConsoleMessage} originatingMessage |
| 234 */ | 242 */ |
| 235 setOriginatingMessage: function(originatingMessage) | 243 setOriginatingMessage: function(originatingMessage) |
| 236 { | 244 { |
| 237 this._originatingConsoleMessage = originatingMessage; | 245 this._originatingConsoleMessage = originatingMessage; |
| 238 }, | 246 }, |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 445 { | 453 { |
| 446 if (!WebInspector.settings.preserveConsoleLog.get()) | 454 if (!WebInspector.settings.preserveConsoleLog.get()) |
| 447 this._console.clearMessages(); | 455 this._console.clearMessages(); |
| 448 } | 456 } |
| 449 } | 457 } |
| 450 | 458 |
| 451 /** | 459 /** |
| 452 * @type {!WebInspector.ConsoleModel} | 460 * @type {!WebInspector.ConsoleModel} |
| 453 */ | 461 */ |
| 454 WebInspector.console; | 462 WebInspector.console; |
| OLD | NEW |