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

Unified Diff: third_party/WebKit/Source/devtools/front_end/timeline_model/TimelineProfileTree.js

Issue 2495903003: DevTools: Show friendly names for Parse/Compile RCS (Closed)
Patch Set: 4 landing Created 4 years, 1 month 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
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/timeline_model/TimelineJSProfile.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/devtools/front_end/timeline_model/TimelineProfileTree.js
diff --git a/third_party/WebKit/Source/devtools/front_end/timeline_model/TimelineProfileTree.js b/third_party/WebKit/Source/devtools/front_end/timeline_model/TimelineProfileTree.js
index 0f6114ba56ff7e7e4ab07f1f929c2e52912e129c..c05d8828b9614d46cd8254a34feec113b6a66075 100644
--- a/third_party/WebKit/Source/devtools/front_end/timeline_model/TimelineProfileTree.js
+++ b/third_party/WebKit/Source/devtools/front_end/timeline_model/TimelineProfileTree.js
@@ -1,6 +1,7 @@
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+
WebInspector.TimelineProfileTree = {};
/**
@@ -213,14 +214,17 @@ WebInspector.TimelineProfileTree.eventStackFrame = function(event) {
* @return {string}
*/
WebInspector.TimelineProfileTree._eventId = function(event) {
- if (event.name === WebInspector.TimelineModel.RecordType.JSFrame) {
- var data = event.args['data'];
- return 'f:' + data['functionName'] + '@' + (data['scriptId'] || data['url'] || '');
- }
- return event.name;
+ if (event.name !== WebInspector.TimelineModel.RecordType.JSFrame)
+ return event.name;
+ const frame = event.args['data'];
+ const location = frame['scriptId'] || frame['url'] || '';
+ const functionName = frame['functionName'];
+ const name = WebInspector.TimelineJSProfileProcessor.isNativeRuntimeFrame(frame)
+ ? WebInspector.TimelineJSProfileProcessor.nativeGroup(functionName) || functionName
+ : functionName;
+ return `f:${name}@${location}`;
};
-
/**
* @unrestricted
*/
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/timeline_model/TimelineJSProfile.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698