From 139bf7cffe7fc8091a397e9504815ec7242e76e7 Mon Sep 17 00:00:00 2001 From: Samuel Susla Date: Tue, 14 Jan 2020 04:03:14 -0800 Subject: [PATCH] Add plugin assertion to ensure image component is loaded Summary: With plugins being used for components, there is danger that someone will remove buck target as dependency and component in the target won't be available for Fabric. That's where `plugin_assertion` comes into play. For now I hardcoded a list of components. In the future, this list will be generated from JS components that are used in the app. Changelog: [Internal] Reviewed By: shergin Differential Revision: D19197548 fbshipit-source-id: 0d31f53b573c343561715a8fb6fc7f0abfdb5b76 --- React/Fabric/Mounting/RCTComponentViewFactory.mm | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/React/Fabric/Mounting/RCTComponentViewFactory.mm b/React/Fabric/Mounting/RCTComponentViewFactory.mm index 1ef6801e67e..773eba1ccc2 100644 --- a/React/Fabric/Mounting/RCTComponentViewFactory.mm +++ b/React/Fabric/Mounting/RCTComponentViewFactory.mm @@ -9,7 +9,6 @@ #import #import -#import #import #import @@ -59,11 +58,7 @@ static Class RCTComponentViewClassWithName(const char [componentViewFactory registerComponentViewClass:[RCTTextInputComponentView class]]; Class imageClass = RCTComponentViewClassWithName("Image"); - if (imageClass) { - [componentViewFactory registerComponentViewClass:imageClass]; - } else { - LOG(FATAL) << "Image component not found"; - } + [componentViewFactory registerComponentViewClass:imageClass]; auto providerRegistry = &componentViewFactory->_providerRegistry;