Commit 0defa02
Forward-declare private-target types in RuntimeScheduler.h (#58271)
Summary:
`RuntimeScheduler.h` included `PerformanceEntryReporter.h` and `ShadowTreeRevisionConsistencyManager.h` solely to name two pointer parameters. Both belong to targets classified private under the three-tier C++ stable API visibility model, and `RuntimeScheduler.h` is reachable from for-frameworks headers, so a consumer opting into `RN_STRICT_API` got a hard error out of `PrivateGuard.h` from a header they never named — one that neither `RN_ALLOW_FRAMEWORKS` nor an umbrella include can suppress.
Replace both with forward declarations, and drop the now-redundant `ShadowTreeRevisionConsistencyManager.h` include from the two scheduler forks, which take the declarations from `RuntimeScheduler.h`. Two translation units were relying on the transitive include and now include the header directly: `RuntimeScheduler_Modern.cpp` (calls `reportLongTask`) and `ReactInstance.cpp` (calls `PerformanceEntryReporter::getInstance`). No build wiring changes — both targets already depend on `react/performance/timeline` and `react/renderer/consistency` for their own sources.
Changelog:
[General][Changed] - `RuntimeScheduler.h` no longer transitively includes `PerformanceEntryReporter.h` or `ShadowTreeRevisionConsistencyManager.h`; include them directly where the complete types are needed
Differential Revision: D1178380941 parent 9418970 commit 0defa02
5 files changed
Lines changed: 10 additions & 4 deletions
File tree
- packages/react-native/ReactCommon/react
- renderer/runtimescheduler
- runtime
Lines changed: 8 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | | - | |
16 | 14 | | |
17 | 15 | | |
18 | 16 | | |
| 17 | + | |
19 | 18 | | |
20 | 19 | | |
21 | 20 | | |
22 | 21 | | |
23 | 22 | | |
24 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
25 | 31 | | |
26 | 32 | | |
27 | 33 | | |
| |||
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | 15 | | |
17 | 16 | | |
18 | 17 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | 13 | | |
15 | 14 | | |
16 | 15 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
0 commit comments