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

Side by Side Diff: Source/devtools/front_end/timeline/TimelineUIUtils.js

Issue 404953004: DevTools: Refactor linkifyRawLocation to use fallback url (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Address aandrey's comments #2 Created 6 years, 4 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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * Copyright (C) 2012 Intel Inc. All rights reserved. 3 * Copyright (C) 2012 Intel Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after
541 541
542 /** 542 /**
543 * @param {string} title 543 * @param {string} title
544 * @param {string} url 544 * @param {string} url
545 * @param {number} line 545 * @param {number} line
546 */ 546 */
547 appendLocationRow: function(title, url, line) 547 appendLocationRow: function(title, url, line)
548 { 548 {
549 if (!this._linkifier || !this._target) 549 if (!this._linkifier || !this._target)
550 return; 550 return;
551 this.appendElementRow(title, this._linkifier.linkifyLocation(this._targe t, url, line - 1) || ""); 551 this.appendElementRow(title, this._linkifier.linkifyScriptLocation(this. _target, null, url, line - 1) || "");
552 }, 552 },
553 553
554 /** 554 /**
555 * @param {string} title 555 * @param {string} title
556 * @param {!Array.<!ConsoleAgent.CallFrame>} stackTrace 556 * @param {!Array.<!ConsoleAgent.CallFrame>} stackTrace
557 */ 557 */
558 appendStackTrace: function(title, stackTrace) 558 appendStackTrace: function(title, stackTrace)
559 { 559 {
560 if (!this._linkifier || !this._target) 560 if (!this._linkifier || !this._target)
561 return; 561 return;
562 562
563 var rowElement = this.element.createChild("div", "timeline-details-view- row"); 563 var rowElement = this.element.createChild("div", "timeline-details-view- row");
564 rowElement.createChild("span", "timeline-details-view-row-title").textCo ntent = WebInspector.UIString("%s: ", title); 564 rowElement.createChild("span", "timeline-details-view-row-title").textCo ntent = WebInspector.UIString("%s: ", title);
565 var stackTraceElement = rowElement.createChild("div", "timeline-details- view-row-stack-trace monospace"); 565 var stackTraceElement = rowElement.createChild("div", "timeline-details- view-row-stack-trace monospace");
566 566
567 for (var i = 0; i < stackTrace.length; ++i) { 567 for (var i = 0; i < stackTrace.length; ++i) {
568 var stackFrame = stackTrace[i]; 568 var stackFrame = stackTrace[i];
569 var row = stackTraceElement.createChild("div"); 569 var row = stackTraceElement.createChild("div");
570 row.createTextChild(stackFrame.functionName || WebInspector.UIString ("(anonymous function)")); 570 row.createTextChild(stackFrame.functionName || WebInspector.UIString ("(anonymous function)"));
571 row.createTextChild(" @ "); 571 row.createTextChild(" @ ");
572 var urlElement = this._linkifier.linkifyLocationByScriptId(this._tar get, stackFrame.scriptId, stackFrame.url, stackFrame.lineNumber - 1, stackFrame. columnNumber - 1); 572 var urlElement = this._linkifier.linkifyScriptLocation(this._target, stackFrame.scriptId, stackFrame.url, stackFrame.lineNumber - 1, stackFrame.colu mnNumber - 1);
573 row.appendChild(urlElement); 573 row.appendChild(urlElement);
574 } 574 }
575 } 575 }
576 } 576 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/sdk/Target.js ('k') | Source/devtools/front_end/timeline/TimelineUIUtilsImpl.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698