mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
create fallback contextContainer (#37441)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/37441 Changelog: [Internal] i just noticed that `[_delegate createContextContainer]` can be null because it returns `shared_ptr`, we should protect against that! Reviewed By: javache Differential Revision: D45805196 fbshipit-source-id: 645815812da1718e1025c7e6b2763e698d86b59a
This commit is contained in:
committed by
Facebook GitHub Bot
parent
a6c658ff69
commit
11251c3db0
@@ -237,6 +237,9 @@ void RCTInstanceSetRuntimeDiagnosticFlags(NSString *flags)
|
||||
RCTLogSetBridgelessCallableJSModules(_bridgeModuleDecorator.callableJSModules);
|
||||
|
||||
auto contextContainer = [_delegate createContextContainer];
|
||||
if (!contextContainer) {
|
||||
contextContainer = std::make_shared<ContextContainer>();
|
||||
}
|
||||
contextContainer->insert(
|
||||
"RCTImageLoader", facebook::react::wrapManagedObject([_turboModuleManager moduleForName:"RCTImageLoader"]));
|
||||
contextContainer->insert(
|
||||
|
||||
Reference in New Issue
Block a user