Commit 4796fc6
Unify bridge and bridgeless ReactMarker implementations (#57040)
Summary:
The split between `logTaggedMarkerImpl` and `logTaggedMarkerBridgelessImpl` no longer earns its keep — bridgeless callers always pass the same instance key, and the bridge mode is on its way out. Collapse the two paths into a single hook so platform code only has to wire up one slot.
`LogTaggedMarkerBridgeless` becomes a type alias for `LogTaggedMarker`. The free `logMarkerBridgeless` / `logTaggedMarkerBridgeless` functions stay around as `[[deprecated]]` shims that forward to the unified path, but the `logTaggedMarkerBridgelessImpl` registration slot is removed entirely — external writers should assign to `logTaggedMarkerImpl` instead. Call-sites in `ReactInstance` switch to the unified `logMarker` / `logTaggedMarker`. On the Android side, `logPerfMarkerBridgeless` and the `logPerfMarkerWithInstanceKey` indirection go away — there's only one instance key now.
`logTaggedMarkerImpl` is also reshaped into a small `AtomicLogTaggedMarker` wrapper so reads and writes synchronize internally and callers no longer need to lock around it; the standalone `logTaggedMarkerImplMutex` goes away.
Changelog:
[General][Breaking] - Remove `logTaggedMarkerBridgelessImpl`; assign callbacks to `logTaggedMarkerImpl` instead
[General][Deprecated] - Deprecate `logMarkerBridgeless` and `logTaggedMarkerBridgeless` in favor of `logMarker` and `logTaggedMarker`
Reviewed By: mdvacca
Differential Revision: D880686651 parent eedfdef commit 4796fc6
17 files changed
Lines changed: 236 additions & 238 deletions
File tree
- packages/react-native
- ReactAndroid/src/main/jni/react/jni
- ReactCommon
- cxxreact
- jsiexecutor/jsireact
- react/runtime
- platform/ios/ReactCommon
- scripts/cxx-api/api-snapshots
Lines changed: 10 additions & 24 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
16 | 20 | | |
17 | 21 | | |
18 | 22 | | |
19 | | - | |
20 | 23 | | |
21 | | - | |
22 | | - | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| |||
51 | 52 | | |
52 | 53 | | |
53 | 54 | | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | 55 | | |
70 | 56 | | |
71 | 57 | | |
| |||
80 | 66 | | |
81 | 67 | | |
82 | 68 | | |
83 | | - | |
| 69 | + | |
84 | 70 | | |
85 | 71 | | |
86 | | - | |
| 72 | + | |
87 | 73 | | |
88 | 74 | | |
89 | 75 | | |
| |||
95 | 81 | | |
96 | 82 | | |
97 | 83 | | |
98 | | - | |
| 84 | + | |
99 | 85 | | |
100 | 86 | | |
101 | | - | |
| 87 | + | |
102 | 88 | | |
103 | 89 | | |
104 | | - | |
| 90 | + | |
105 | 91 | | |
106 | 92 | | |
107 | | - | |
| 93 | + | |
108 | 94 | | |
109 | 95 | | |
110 | 96 | | |
| |||
Lines changed: 0 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
29 | | - | |
30 | 28 | | |
31 | 29 | | |
32 | 30 | | |
| |||
Lines changed: 4 additions & 22 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
| 12 | + | |
24 | 13 | | |
25 | 14 | | |
26 | 15 | | |
27 | 16 | | |
28 | 17 | | |
29 | 18 | | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
| 19 | + | |
38 | 20 | | |
39 | 21 | | |
40 | 22 | | |
41 | | - | |
| 23 | + | |
42 | 24 | | |
43 | 25 | | |
44 | 26 | | |
45 | | - | |
| 27 | + | |
46 | 28 | | |
47 | 29 | | |
48 | 30 | | |
| |||
Lines changed: 38 additions & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | 11 | | |
15 | | - | |
| 12 | + | |
| 13 | + | |
16 | 14 | | |
17 | 15 | | |
18 | 16 | | |
| |||
36 | 34 | | |
37 | 35 | | |
38 | 36 | | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
| 37 | + | |
| 38 | + | |
46 | 39 | | |
47 | 40 | | |
48 | 41 | | |
49 | 42 | | |
50 | 43 | | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
56 | 74 | | |
57 | | - | |
58 | | - | |
59 | | - | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
60 | 78 | | |
| 79 | + | |
61 | 80 | | |
62 | 81 | | |
63 | 82 | | |
| |||
Lines changed: 2 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
| 147 | + | |
155 | 148 | | |
156 | 149 | | |
157 | 150 | | |
158 | 151 | | |
159 | 152 | | |
160 | 153 | | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
| 154 | + | |
166 | 155 | | |
167 | 156 | | |
168 | 157 | | |
| |||
Lines changed: 4 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
| 73 | + | |
| 74 | + | |
82 | 75 | | |
83 | 76 | | |
84 | 77 | | |
| |||
101 | 94 | | |
102 | 95 | | |
103 | 96 | | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
| 97 | + | |
| 98 | + | |
108 | 99 | | |
109 | 100 | | |
110 | 101 | | |
| |||
0 commit comments