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

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 28d0a5f6f47b0400418c7c38a741dc565b703ce7..f1774126b7de0b574f5343ea7e5abd233159eb7d 100644
--- a/third_party/WebKit/Source/devtools/front_end/profiler/HeapProfileView.js
+++ b/third_party/WebKit/Source/devtools/front_end/profiler/HeapProfileView.js
@@ -221,7 +221,18 @@ 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
+ });
+ }
this.self = node.selfSize;
}
@@ -301,7 +312,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");
}
}
@@ -421,7 +432,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