Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions front_end/panels/timeline/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ devtools_module("timeline") {
":easter-egg",
"../../core/host:bundle",
"../../core/i18n:bundle",
"../../core/root:bundle",
"../../generated:protocol",
"../../models/cpu_profile:bundle",
"../../models/extensions:bundle",
Expand Down
11 changes: 10 additions & 1 deletion front_end/panels/timeline/TimelineHistoryManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
import * as Common from '../../core/common/common.js';
import * as i18n from '../../core/i18n/i18n.js';
import * as Platform from '../../core/platform/platform.js';
import * as Root from '../../core/root/root.js';
import * as SDK from '../../core/sdk/sdk.js';
import * as Trace from '../../models/trace/trace.js';
import * as IconButton from '../../ui/components/icon_button/icon_button.js';
import * as UI from '../../ui/legacy/legacy.js';
Expand Down Expand Up @@ -339,7 +341,14 @@ export class TimelineHistoryManager {
parsedTraceIndex: number, parsedTrace: Trace.Handlers.Types.ParsedTrace, metadata: Trace.Types.File.MetaData|null,
filmStrip: Trace.Extras.FilmStrip.Data|null): HTMLDivElement {
const parsedURL = Common.ParsedURL.ParsedURL.fromString(parsedTrace.Meta.mainFrameURL);
const domain = parsedURL ? parsedURL.host : '';
let domain = parsedURL ? parsedURL.host : '';
// [RN] React Native doesn't have a URL as a concept for Frame, we will use Application name as a fallback.
if (Root.Runtime.experiments.isEnabled(Root.Runtime.ExperimentName.REACT_NATIVE_SPECIFIC_UI)) {
const reactNativeApplicationModel = SDK.TargetManager.TargetManager.instance().primaryPageTarget()?.model(SDK.ReactNativeApplicationModel.ReactNativeApplicationModel);
if (reactNativeApplicationModel !== null && reactNativeApplicationModel !== undefined) {
domain = reactNativeApplicationModel.metadataCached?.appDisplayName || '';
}
}

const sequenceNumber = this.nextNumberByDomain.get(domain) || 1;
const titleWithSequenceNumber = i18nString(UIStrings.sD, {PH1: domain, PH2: sequenceNumber});
Expand Down
Loading