Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(184)

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/console_model/ConsoleModel.js

Issue 2878053003: DevTools: Find executionContextId for console message from scriptId (Closed)
Patch Set: move into runtime Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/sdk/RuntimeModel.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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;
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/sdk/RuntimeModel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698