Fix use-after-move of ContextContainer in PointerEventsProcessorTest (#57812)

Summary:
Pull Request resolved: https://github.com/react/react-native/pull/57812

The whole `PointerEventsProcessorTest` suite has been aborting in its fixture constructor since the `modernize-use-designated-initializers` codemod moved the `ContextContainer` into `ComponentDescriptorParameters`. The `shared_ptr` is read twice more afterwards — once to construct the `UIManager` and once to construct the `ShadowTree` — so the move left both with a null container and the second read tripped the libstdc++ null-deref assert.

Stop moving out of a `shared_ptr` that is still needed by later statements.

Changelog: [Internal]

___

Differential Revision: D114730311

fbshipit-source-id: e7fe2b5bbc40dcbf9571cc917ec6e78baf49524a
This commit is contained in:
Pieter De Baets authored and meta-codesync[bot] committed 2026-08-06 02:58:49 -07:00
1 parent 65008fcdd0
commit f8216139ca
1 file changed
+1 -1
@@ -44,7 +44,7 @@ class PointerEventsProcessorTest : public ::testing::Test {
componentDescriptorProviderRegistry.createComponentDescriptorRegistry(
ComponentDescriptorParameters{
.eventDispatcher = eventDispatcher,
.contextContainer = std::move(contextContainer),
.contextContainer = contextContainer,
.flavor = nullptr});
componentDescriptorProviderRegistry.add(