File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
front_end/panels/profiler Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change 4
4
5
5
import * as Host from '../../core/host/host.js' ;
6
6
import * as i18n from '../../core/i18n/i18n.js' ;
7
+ import * as Root from '../../core/root/root.js' ;
7
8
import type * as SDK from '../../core/sdk/sdk.js' ;
8
9
import * as UI from '../../ui/legacy/legacy.js' ;
9
10
@@ -24,8 +25,17 @@ let heapProfilerPanelInstance: HeapProfilerPanel;
24
25
export class HeapProfilerPanel extends ProfilesPanel implements UI . ContextMenu . Provider < SDK . RemoteObject . RemoteObject > ,
25
26
UI . ActionRegistration . ActionDelegate {
26
27
constructor ( ) {
28
+ const isReactNative = Root . Runtime . experiments . isEnabled (
29
+ Root . Runtime . ExperimentName . REACT_NATIVE_SPECIFIC_UI ,
30
+ ) ;
27
31
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
+ ] : [
29
39
registry . heapSnapshotProfileType ,
30
40
registry . trackingHeapSnapshotProfileType ,
31
41
registry . samplingHeapProfileType ,
You can’t perform that action at this time.
0 commit comments