Commit ff3ea5e
Forward declare LeakChecker in UIManager.h (#58091)
Summary:
Pull Request resolved: #58091
Under the C++ Stable API RFC, `react/renderer/uimanager:uimanager` is a public target while `react/renderer/leakchecker:leakchecker` is private. `UIManager.h` is an exported header of the uimanager target and is re-exported from the module umbrella `React/UIManager.h`, so it transitively exposed the private module through the blessed public entry point. The private guard is suppressed only by `RN_BUILDING`, not by `RN_UMBRELLA_CONTEXT`, so a consumer including `<React/UIManager.h>` under `RN_STRICT_API` would get a hard error from a header they never named and cannot acknowledge.
`UIManager.h` only needs the type for the `std::unique_ptr<LeakChecker> leakChecker_` data member. `~UIManager()` is already out of line, so a forward declaration is sufficient and the include moves to `UIManager.cpp`, which already constructs the object. No build config change is needed: `leakchecker` is already a non-exported dep of the uimanager target in both BUCK and CMake.
`UIManager.h` is the only public or for-frameworks header in ReactCommon that still reached `leakchecker`, so the module is now cleanly private.
Changelog: [Internal]
Reviewed By: christophpurrer
Differential Revision: D117188750
fbshipit-source-id: c607a8c3a9d8208bbffa66ecf13dcf44102cbce41 parent 1b83899 commit ff3ea5e
2 files changed
Lines changed: 2 additions & 1 deletion
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
25 | 24 | | |
26 | 25 | | |
27 | 26 | | |
| |||
37 | 36 | | |
38 | 37 | | |
39 | 38 | | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| |||
0 commit comments