File tree Expand file tree Collapse file tree
front_end/panels/profiler Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44
55import * as Host from '../../core/host/host.js' ;
66import * as i18n from '../../core/i18n/i18n.js' ;
7+ import * as Root from '../../core/root/root.js' ;
78import type * as SDK from '../../core/sdk/sdk.js' ;
89import * as UI from '../../ui/legacy/legacy.js' ;
910
@@ -24,8 +25,17 @@ let heapProfilerPanelInstance: HeapProfilerPanel;
2425export class HeapProfilerPanel extends ProfilesPanel implements UI . ContextMenu . Provider < SDK . RemoteObject . RemoteObject > ,
2526 UI . ActionRegistration . ActionDelegate {
2627 constructor ( ) {
28+ const isReactNative = Root . Runtime . experiments . isEnabled (
29+ Root . Runtime . ExperimentName . REACT_NATIVE_SPECIFIC_UI ,
30+ ) ;
2731 const registry = instance ;
28- const profileTypes = [
32+ // [RN] Allocation sampling and Detached elements memory profiling options are not supported.
33+ // We are hiding these options from the UI.
34+ const profileTypes = isReactNative ? [
35+ registry . heapSnapshotProfileType ,
36+ registry . trackingHeapSnapshotProfileType ,
37+ registry . samplingHeapProfileType ,
38+ ] : [
2939 registry . heapSnapshotProfileType ,
3040 registry . trackingHeapSnapshotProfileType ,
3141 registry . samplingHeapProfileType ,
You can’t perform that action at this time.
0 commit comments