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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/profiler/CPUProfileView.js

Issue 2151653005: DevTools: Do not linkify to pseudo (program) node when there's no URL (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update a test expectation. Created 4 years, 5 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) 2008 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008 Apple 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 * @return {string} 338 * @return {string}
339 */ 339 */
340 formatPercent: function(value, node) 340 formatPercent: function(value, node)
341 { 341 {
342 return node.profileNode === this._profileView.profile.idleNode ? "" : We bInspector.UIString("%.2f\u2009%%", value); 342 return node.profileNode === this._profileView.profile.idleNode ? "" : We bInspector.UIString("%.2f\u2009%%", value);
343 }, 343 },
344 344
345 /** 345 /**
346 * @override 346 * @override
347 * @param {!WebInspector.ProfileDataGridNode} node 347 * @param {!WebInspector.ProfileDataGridNode} node
348 * @return {!Element} 348 * @return {?Element}
349 */ 349 */
350 linkifyNode: function(node) 350 linkifyNode: function(node)
351 { 351 {
352 return this._profileView.linkifier().linkifyConsoleCallFrame(this._profi leView.target(), node.profileNode.callFrame, "profile-node-file"); 352 return this._profileView.linkifier().linkifyConsoleCallFrame(this._profi leView.target(), node.profileNode.callFrame, "profile-node-file");
353 } 353 }
354 } 354 }
355 355
356 /** 356 /**
357 * @constructor 357 * @constructor
358 * @extends {WebInspector.ProfileFlameChartDataProvider} 358 * @extends {WebInspector.ProfileFlameChartDataProvider}
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
478 return WebInspector.UIString("%.1f\u2009ms", ms); 478 return WebInspector.UIString("%.1f\u2009ms", ms);
479 return Number.secondsToString(ms / 1000, true); 479 return Number.secondsToString(ms / 1000, true);
480 } 480 }
481 var name = WebInspector.beautifyFunctionName(node.functionName); 481 var name = WebInspector.beautifyFunctionName(node.functionName);
482 pushEntryInfoRow(WebInspector.UIString("Name"), name); 482 pushEntryInfoRow(WebInspector.UIString("Name"), name);
483 var selfTime = millisecondsToString(this._entrySelfTimes[entryIndex]); 483 var selfTime = millisecondsToString(this._entrySelfTimes[entryIndex]);
484 var totalTime = millisecondsToString(timelineData.entryTotalTimes[entryI ndex]); 484 var totalTime = millisecondsToString(timelineData.entryTotalTimes[entryI ndex]);
485 pushEntryInfoRow(WebInspector.UIString("Self time"), selfTime); 485 pushEntryInfoRow(WebInspector.UIString("Self time"), selfTime);
486 pushEntryInfoRow(WebInspector.UIString("Total time"), totalTime); 486 pushEntryInfoRow(WebInspector.UIString("Total time"), totalTime);
487 var linkifier = new WebInspector.Linkifier(); 487 var linkifier = new WebInspector.Linkifier();
488 var text = linkifier.linkifyConsoleCallFrame(this._target, node.callFram e).textContent; 488 var link = linkifier.linkifyConsoleCallFrame(this._target, node.callFram e);
489 if (link)
490 pushEntryInfoRow(WebInspector.UIString("URL"), link.textContent);
489 linkifier.dispose(); 491 linkifier.dispose();
490 pushEntryInfoRow(WebInspector.UIString("URL"), text);
491 pushEntryInfoRow(WebInspector.UIString("Aggregated self time"), Number.s econdsToString(node.self / 1000, true)); 492 pushEntryInfoRow(WebInspector.UIString("Aggregated self time"), Number.s econdsToString(node.self / 1000, true));
492 pushEntryInfoRow(WebInspector.UIString("Aggregated total time"), Number. secondsToString(node.total / 1000, true)); 493 pushEntryInfoRow(WebInspector.UIString("Aggregated total time"), Number. secondsToString(node.total / 1000, true));
493 if (node.deoptReason && node.deoptReason !== "no reason") 494 if (node.deoptReason && node.deoptReason !== "no reason")
494 pushEntryInfoRow(WebInspector.UIString("Not optimized"), node.deoptR eason); 495 pushEntryInfoRow(WebInspector.UIString("Not optimized"), node.deoptR eason);
495 496
496 return entryInfo; 497 return entryInfo;
497 }, 498 },
498 499
499 __proto__: WebInspector.ProfileFlameChartDataProvider.prototype 500 __proto__: WebInspector.ProfileFlameChartDataProvider.prototype
500 } 501 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698