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 422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
433 if (this.request) { | 433 if (this.request) { |
434 var initiator = this.request.initiator(); | 434 var initiator = this.request.initiator(); |
435 if (initiator) { | 435 if (initiator) { |
436 this.stackTrace = initiator.stack || undefined; | 436 this.stackTrace = initiator.stack || undefined; |
437 if (initiator.url) { | 437 if (initiator.url) { |
438 this.url = initiator.url; | 438 this.url = initiator.url; |
439 this.line = initiator.lineNumber || 0; | 439 this.line = initiator.lineNumber || 0; |
440 } | 440 } |
441 } | 441 } |
442 } | 442 } |
| 443 if (!this.executionContextId && this._runtimeModel) { |
| 444 if (this.scriptId) |
| 445 this.executionContextId = this._runtimeModel.executionContextIdForScript
Id(this.scriptId); |
| 446 else if (this.stackTrace) |
| 447 this.executionContextId = this._runtimeModel.executionContextForStackTra
ce(this.stackTrace); |
| 448 } |
443 } | 449 } |
444 | 450 |
445 /** | 451 /** |
446 * @param {!ConsoleModel.ConsoleMessage} a | 452 * @param {!ConsoleModel.ConsoleMessage} a |
447 * @param {!ConsoleModel.ConsoleMessage} b | 453 * @param {!ConsoleModel.ConsoleMessage} b |
448 * @return {number} | 454 * @return {number} |
449 */ | 455 */ |
450 static timestampComparator(a, b) { | 456 static timestampComparator(a, b) { |
451 return a.timestamp - b.timestamp; | 457 return a.timestamp - b.timestamp; |
452 } | 458 } |
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
656 return 2; | 662 return 2; |
657 return 3; | 663 return 3; |
658 }; | 664 }; |
659 | 665 |
660 ConsoleModel.ConsoleModel._events = Symbol('ConsoleModel.ConsoleModel.events'); | 666 ConsoleModel.ConsoleModel._events = Symbol('ConsoleModel.ConsoleModel.events'); |
661 | 667 |
662 /** | 668 /** |
663 * @type {!ConsoleModel.ConsoleModel} | 669 * @type {!ConsoleModel.ConsoleModel} |
664 */ | 670 */ |
665 ConsoleModel.consoleModel; | 671 ConsoleModel.consoleModel; |
OLD | NEW |