mirror of
https://github.com/facebook/react-native.git
synced 2026-11-18 20:19:07 +00:00
cleanup enabled_automatic_interop_android (#47321)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/47321 Changelog: [Internal] this seems to be the last callsite where we read the ReactNativeConfig from the contextContainer. i don't think this killswitch should block cleanup of the ReactNativeConfig, so maybe we can just remove this? Reviewed By: cortinico Differential Revision: D65192744 fbshipit-source-id: d8b595edb6fecce05e67abc257d98805daa16a9a
This commit is contained in:
1 parent
b98846c2e3
commit
3a68f14ac2
2 files changed
+5
-21
No files matched your search
@@ -10,9 +10,6 @@
|
||||
namespace facebook::react {
|
||||
|
||||
bool EmptyReactNativeConfig::getBool(const std::string& param) const {
|
||||
if (param == "react_fabric:enabled_automatic_interop_android") {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
+5
-18
@@ -9,7 +9,6 @@
|
||||
|
||||
#include "componentNameByReactViewName.h"
|
||||
|
||||
#include <react/config/ReactNativeConfig.h>
|
||||
#include <react/debug/react_native_assert.h>
|
||||
#include <react/renderer/componentregistry/ComponentDescriptorProviderRegistry.h>
|
||||
#include <react/renderer/components/legacyviewmanagerinterop/UnstableLegacyViewManagerAutomaticComponentDescriptor.h>
|
||||
@@ -84,23 +83,11 @@ const ComponentDescriptor& ComponentDescriptorRegistry::at(
|
||||
}
|
||||
|
||||
if (it == _registryByName.end()) {
|
||||
auto reactNativeConfig_ =
|
||||
contextContainer_->at<std::shared_ptr<const ReactNativeConfig>>(
|
||||
"ReactNativeConfig");
|
||||
if (reactNativeConfig_->getBool(
|
||||
"react_fabric:enabled_automatic_interop_android")) {
|
||||
auto componentDescriptor = std::make_shared<
|
||||
const UnstableLegacyViewManagerAutomaticComponentDescriptor>(
|
||||
parameters_, unifiedComponentName);
|
||||
registerComponentDescriptor(componentDescriptor);
|
||||
return *_registryByName.find(unifiedComponentName)->second;
|
||||
} else if (_fallbackComponentDescriptor == nullptr) {
|
||||
throw std::invalid_argument(
|
||||
("Unable to find componentDescriptor for " + unifiedComponentName)
|
||||
.c_str());
|
||||
} else {
|
||||
return *_fallbackComponentDescriptor.get();
|
||||
}
|
||||
auto componentDescriptor = std::make_shared<
|
||||
const UnstableLegacyViewManagerAutomaticComponentDescriptor>(
|
||||
parameters_, unifiedComponentName);
|
||||
registerComponentDescriptor(componentDescriptor);
|
||||
return *_registryByName.find(unifiedComponentName)->second;
|
||||
}
|
||||
|
||||
return *it->second;
|
||||
|
||||
Reference in new issue
Block a user