Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid calling abstract methods in RCTComposedViewRegistry
Summary: `RCTComposedViewRegistry` extends `NSMutableDictionary` which is a clustered class in iOS. NSMutableDictionary is techncially an abstract class, but when instantiated by `[NSMutableDictionary new];` the system will return one of concrete classes that inherit from `NSMutableDictionary`, opaquely from the perspective of the caller. By calling `super`, we are actually calling the not implemented method for the abstract class. If this happen, this can crash the app. Given that the `RCTComposedViewRegistry` is extending the dictionary only for its interface but is using other mechanisms as storage, is it fair to return `NULL`if the storages don't have the requested view. ## Changelog [iOS][Fixed] - Avoid calling abstract methods in RCTComposedViewRegistry Reviewed By: cortinico Differential Revision: D56755427 fbshipit-source-id: f5c56dc59ccc6b30c00199b4196c42eb9b021e2b
- Loading branch information