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

Unified Diff: third_party/WebKit/Source/devtools/front_end/profiler/HeapProfileView.js

Issue 2150803002: [DevTools] Add callFrame to CPUProfileNode & SamplingHeapProfileNode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed comments 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/devtools/front_end/profiler/HeapProfileView.js
diff --git a/third_party/WebKit/Source/devtools/front_end/profiler/HeapProfileView.js b/third_party/WebKit/Source/devtools/front_end/profiler/HeapProfileView.js
index 24404a69af4658c21ddcf269d3be7de690311cc2..dadfaca11f30a4480987075a7f3f4c43c6f85d00 100644
--- a/third_party/WebKit/Source/devtools/front_end/profiler/HeapProfileView.js
+++ b/third_party/WebKit/Source/devtools/front_end/profiler/HeapProfileView.js
@@ -221,9 +221,15 @@ WebInspector.SamplingHeapProfileHeader.prototype = {
*/
WebInspector.SamplingHeapProfileNode = function(node)
{
- WebInspector.ProfileNode.call(this, node.functionName, node.scriptId, node.url, node.lineNumber, node.columnNumber);
+ if (node.callFrame) {
+ WebInspector.ProfileNode.call(this, node.callFrame);
+ } else {
+ // Backward compatibility for old SamplingHeapProfileNode format.
+ var frame = /** @type {!RuntimeAgent.CallFrame} */(node);
+ WebInspector.ProfileNode.call(this, { functionName: frame.functionName, scriptId: frame.scriptId, url: frame.url, lineNumber: frame.lineNumber - 1, columnNumber: frame.columnNumber - 1});
alph 2016/07/14 21:53:28 could you please format it to have a field per lin
kozy 2016/07/15 00:19:02 Done.
+ }
this.self = node.selfSize;
- this.callUID = `${this.frame.functionName}@${this.frame.scriptId}:${this.frame.lineNumber}`;
+ this.callUID = `${this.callFrame.functionName}@${this.callFrame.scriptId}:${this.callFrame.lineNumber}`;
}
WebInspector.SamplingHeapProfileNode.prototype = {
@@ -302,7 +308,7 @@ WebInspector.HeapProfileView.NodeFormatter.prototype = {
*/
linkifyNode: function(node)
{
- return this._profileView.linkifier().linkifyConsoleCallFrameForTimeline(this._profileView.target(), node.profileNode.frame, "profile-node-file");
+ return this._profileView.linkifier().linkifyConsoleCallFrame(this._profileView.target(), node.profileNode.callFrame, "profile-node-file");
}
}
@@ -422,7 +428,7 @@ WebInspector.HeapFlameChartDataProvider.prototype = {
pushEntryInfoRow(WebInspector.UIString("Self size"), Number.bytesToString(node.self));
pushEntryInfoRow(WebInspector.UIString("Total size"), Number.bytesToString(node.total));
var linkifier = new WebInspector.Linkifier();
- var text = (new WebInspector.Linkifier()).linkifyConsoleCallFrameForTimeline(this._target, node.frame).textContent;
+ var text = (new WebInspector.Linkifier()).linkifyConsoleCallFrame(this._target, node.callFrame).textContent;
linkifier.dispose();
pushEntryInfoRow(WebInspector.UIString("URL"), text);
return entryInfo;

Powered by Google App Engine
This is Rietveld 408576698