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

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

Issue 2921963002: [Devtools] Removed NetworkRequest dependency on NetworkManager (Closed)
Patch Set: changes Created 3 years, 6 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
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 409 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 /** @type {number} */ 420 /** @type {number} */
421 this.column = column || 0; 421 this.column = column || 0;
422 this.parameters = parameters; 422 this.parameters = parameters;
423 /** @type {!Protocol.Runtime.StackTrace|undefined} */ 423 /** @type {!Protocol.Runtime.StackTrace|undefined} */
424 this.stackTrace = stackTrace; 424 this.stackTrace = stackTrace;
425 this.timestamp = timestamp || Date.now(); 425 this.timestamp = timestamp || Date.now();
426 this.executionContextId = executionContextId || 0; 426 this.executionContextId = executionContextId || 0;
427 this.scriptId = scriptId || null; 427 this.scriptId = scriptId || null;
428 this.workerId = workerId || null; 428 this.workerId = workerId || null;
429 429
430 var networkManager = (runtimeModel && requestId) ? runtimeModel.target().mod el(SDK.NetworkManager) : null; 430 var manager = runtimeModel ? runtimeModel.target().model(SDK.NetworkManager) : null;
dgozman 2017/06/06 20:54:40 nit: what was the point of renaming the variable?
allada 2017/06/08 00:42:06 It was just so I could fit the line below on one l
431 this.request = (networkManager && requestId) ? NetworkLog.networkLog.request ForId(networkManager, requestId) : null; 431 this.request = (manager && requestId) ? NetworkLog.networkLog.requestByManag erAndId(manager, requestId) : null;
432 432
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 }
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
662 return 2; 662 return 2;
663 return 3; 663 return 3;
664 }; 664 };
665 665
666 ConsoleModel.ConsoleModel._events = Symbol('ConsoleModel.ConsoleModel.events'); 666 ConsoleModel.ConsoleModel._events = Symbol('ConsoleModel.ConsoleModel.events');
667 667
668 /** 668 /**
669 * @type {!ConsoleModel.ConsoleModel} 669 * @type {!ConsoleModel.ConsoleModel}
670 */ 670 */
671 ConsoleModel.consoleModel; 671 ConsoleModel.consoleModel;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698