react-native/React/Views
Nick Lockwood 34ec6a91a9 Move setBridge: off main thread
Summary:
Previously, if a module implemented `setBridge:` we assumed that it needs to be initialised on the main thread. This assumption was not really warranted however, and it was a barrier to deferring module initialization.

This diff tweaks the rules so that only modules that override `init` or `constantsToExport**` are assumed to require main thread initialization, and others can be created lazily when they are first used.

WARNING: this will be a breaking change to any 3rd party modules that are assuming `setBridge:` is called on the main thread. Those modules should be rewritten to move any code that requires the main thread into `init` or `constantsToExport` instead.

`**` We will also be examining whether `constantsToExport` can be done lazily, but for now any module that uses it will still be created eagerly when the bridge starts up.

Reviewed By: javache

Differential Revision: D3240682

fb-gh-sync-id: 48f309e3158bbccb52141032baf70def3e609371
fbshipit-source-id: 48f309e3158bbccb52141032baf70def3e609371
2016-05-03 09:09:21 -07:00
..
RCTActivityIndicatorViewManager.h Improved RCTActivityIndicatorView and fixed some flow errors 2015-04-26 02:17:13 -08:00
RCTActivityIndicatorViewManager.m Convert alloc/init to new to please linter 2015-08-17 08:46:00 -07:00
RCTAnimationType.h [LayoutAnimation] RCTAnimationTypeKeyboard 2015-06-25 09:17:01 -08:00
RCTAutoInsetsProtocol.h Automatically adjust content inset after view controller did layout subviews 2015-09-04 07:00:21 -08:00
RCTBorderDrawing.h Support dashed and dotted border styles on iOS 2015-12-23 10:07:28 -08:00
RCTBorderDrawing.m Fixed border smearing issue 2016-01-07 12:03:17 -08:00
RCTBorderStyle.h Add property mapping for `borderStyle` from JS to `RCTView` (iOS) 2015-12-01 09:00:28 -08:00
RCTComponent.h added `didSetProps` for views and shadow views 2015-11-27 04:03:42 -08:00
RCTComponentData.h Removed eager init of all ViewManagers on layout 2016-02-26 08:18:34 -08:00
RCTComponentData.m add missing RCTConvert import 2016-04-15 13:24:21 -07:00
RCTConvert+CoreLocation.h [MapView] Support for annotation callouts, annotation press, callout presses and pin animation 2015-06-25 09:15:21 -08:00
RCTConvert+CoreLocation.m [MapView] Support for annotation callouts, annotation press, callout presses and pin animation 2015-06-25 09:15:21 -08:00
RCTConvert+MapKit.h Added ability to use a custom view for MapView annotations 2015-12-17 06:46:33 -08:00
RCTConvert+MapKit.m Implement draggable annotations on MapView. Closes #2512 2016-01-04 06:38:30 -08:00
RCTDatePicker.h Added mechanism for directly mapping JS event handlers to blocks 2015-09-02 06:11:24 -08:00
RCTDatePicker.m Added mechanism for directly mapping JS event handlers to blocks 2015-09-02 06:11:24 -08:00
RCTDatePickerManager.h Removed deprecated RCT_EXPORT + code paths 2015-06-05 09:58:25 -08:00
RCTDatePickerManager.m Removed exported constants for fixed-size views 2016-04-26 04:21:39 -07:00
RCTImageComponent.h Implemented inline image support for <Text> 2015-10-08 11:56:25 -07:00
RCTMap.h Add MapView annotation callback when it gets / lost the focus 2016-01-29 06:26:30 -08:00
RCTMap.m Conditionally allowing showCompass view property 2016-02-03 11:36:36 -08:00
RCTMapAnnotation.h Implement draggable annotations on MapView. Closes #2512 2016-01-04 06:38:30 -08:00
RCTMapAnnotation.m Add Polyline support to MapView 2015-11-26 08:54:16 -08:00
RCTMapManager.h [ReactNative] s/ReactKit/React/g 2015-03-26 02:42:24 -08:00
RCTMapManager.m Fixed array bounds error in MapView 2016-04-22 10:59:29 -07:00
RCTMapOverlay.h Add Polyline support to MapView 2015-11-26 08:54:16 -08:00
RCTMapOverlay.m Add Polyline support to MapView 2015-11-26 08:54:16 -08:00
RCTModalHostView.h Modal Animation Types 2016-04-28 16:00:32 -07:00
RCTModalHostView.m Modal Animation Types 2016-04-28 16:00:32 -07:00
RCTModalHostViewController.h Add <Modal /> component 2015-07-28 07:21:50 -08:00
RCTModalHostViewController.m Support multiple interface orientations in RCTDevLoadingView 2016-02-25 09:52:30 -08:00
RCTModalHostViewManager.h Enable transparent modal presentation with <Modal /> 2015-08-14 04:47:12 -08:00
RCTModalHostViewManager.m Modal Animation Types 2016-04-28 16:00:32 -07:00
RCTNavItem.h Added RCTImageSource 2015-12-08 03:32:30 -08:00
RCTNavItem.m Added RCTImageSource 2015-12-08 03:32:30 -08:00
RCTNavItemManager.h [ReactNative] s/ReactKit/React/g 2015-03-26 02:42:24 -08:00
RCTNavItemManager.m Added RCTImageSource 2015-12-08 03:32:30 -08:00
RCTNavigator.h Remove isValid from RCTInvalidating 2015-08-14 01:57:18 -08:00
RCTNavigator.m limit fake scroll event emitting 2016-04-01 06:54:50 -07:00
RCTNavigatorManager.h [ReactNative] s/ReactKit/React/g 2015-03-26 02:42:24 -08:00
RCTNavigatorManager.m Replaced RCTSparseArray with NSDictionary 2015-11-14 10:28:28 -08:00
RCTPicker.h Added support for styling the PickerIOS 2015-12-08 07:48:26 -08:00
RCTPicker.m Added support for styling the PickerIOS 2015-12-08 07:48:26 -08:00
RCTPickerManager.h [ReactNative] s/ReactKit/React/g 2015-03-26 02:42:24 -08:00
RCTPickerManager.m Removed exported constants for fixed-size views 2016-04-26 04:21:39 -07:00
RCTPointerEvents.h [ReactNative] s/ReactKit/React/g 2015-03-26 02:42:24 -08:00
RCTProgressViewManager.h Added ProgressViewIOS 2015-06-03 09:49:35 -08:00
RCTProgressViewManager.m Removed exported constants for fixed-size views 2016-04-26 04:21:39 -07:00
RCTRefreshControl.h Cross platform PullToRefreshView component 2016-01-04 08:00:29 -08:00
RCTRefreshControl.m Fix refreshing state 2016-04-17 00:33:25 -07:00
RCTRefreshControlManager.h Cross platform PullToRefreshView component 2016-01-04 08:00:29 -08:00
RCTRefreshControlManager.m Allow to set refresh control title color 2016-04-16 15:15:25 -07:00
RCTRootShadowView.h Extracted rootview-specific shadowview logic into new class 2016-03-21 03:21:27 -07:00
RCTRootShadowView.m Update css-layout from github 2016-04-04 04:10:24 -07:00
RCTScrollView.h Deprecated customDirectEventTypes, and removed from RCTScrollViewManager 2016-04-28 07:44:19 -07:00
RCTScrollView.m Deprecated customDirectEventTypes, and removed from RCTScrollViewManager 2016-04-28 07:44:19 -07:00
RCTScrollViewManager.h Remove scrollview support from UIManager, remove mainScrollView(delegate) 2015-11-25 04:12:34 -08:00
RCTScrollViewManager.m Deprecated customDirectEventTypes, and removed from RCTScrollViewManager 2016-04-28 07:44:19 -07:00
RCTScrollableProtocol.h Remove scrollview support from UIManager, remove mainScrollView(delegate) 2015-11-25 04:12:34 -08:00
RCTSegmentedControl.h Added lightweight generic annotations 2015-11-03 14:49:30 -08:00
RCTSegmentedControl.m Added lightweight generic annotations 2015-11-03 14:49:30 -08:00
RCTSegmentedControlManager.h Add SegmentedControlIOS 2015-04-29 08:08:45 -08:00
RCTSegmentedControlManager.m Removed exported constants for fixed-size views 2016-04-26 04:21:39 -07:00
RCTShadowView.h Extracted rootview-specific shadowview logic into new class 2016-03-21 03:21:27 -07:00
RCTShadowView.m Update css-layout from github 2016-04-04 04:10:24 -07:00
RCTSlider.h Add option for both min/max track image. 2015-12-21 10:30:39 -08:00
RCTSlider.m Add option for both min/max track image. 2015-12-21 10:30:39 -08:00
RCTSliderManager.h [ReactNative] s/ReactKit/React/g 2015-03-26 02:42:24 -08:00
RCTSliderManager.m Add option for both min/max track image. 2015-12-21 10:30:39 -08:00
RCTSwitch.h Added mechanism for directly mapping JS event handlers to blocks 2015-09-02 06:11:24 -08:00
RCTSwitch.m [ReactNative] s/ReactKit/React/g 2015-03-26 02:42:24 -08:00
RCTSwitchManager.h [ReactNative] s/ReactKit/React/g 2015-03-26 02:42:24 -08:00
RCTSwitchManager.m Added mechanism for directly mapping JS event handlers to blocks 2015-09-02 06:11:24 -08:00
RCTTabBar.h Enable setting color of text and images on unselected tabs 2016-05-03 05:40:29 -07:00
RCTTabBar.m Enable setting color of text and images on unselected tabs 2016-05-03 05:40:29 -07:00
RCTTabBarItem.h Enable setting color of text and images on unselected tabs 2016-05-03 05:40:29 -07:00
RCTTabBarItem.m Enable setting color of text and images on unselected tabs 2016-05-03 05:40:29 -07:00
RCTTabBarItemManager.h [ReactNative] s/ReactKit/React/g 2015-03-26 02:42:24 -08:00
RCTTabBarItemManager.m Enable setting color of text and images on unselected tabs 2016-05-03 05:40:29 -07:00
RCTTabBarManager.h [ReactNative] s/ReactKit/React/g 2015-03-26 02:42:24 -08:00
RCTTabBarManager.m Enable setting color of text and images on unselected tabs 2016-05-03 05:40:29 -07:00
RCTTextDecorationLineType.h <Text> module add textDecoration style attributes 2015-07-07 06:15:20 -08:00
RCTView.h Add hitSlop prop on iOS and Android 2016-02-16 16:51:39 -08:00
RCTView.m Add hitSlop prop on iOS and Android 2016-02-16 16:51:39 -08:00
RCTViewControllerProtocol.h [ReactNative] s/ReactKit/React/g 2015-03-26 02:42:24 -08:00
RCTViewManager.h Move setBridge: off main thread 2016-05-03 09:09:21 -07:00
RCTViewManager.m Deprecate transformMatrix and decomposedMatrix 2016-04-29 14:19:25 -07:00
RCTWebView.h Implemented stopLoading 2016-04-22 08:15:25 -07:00
RCTWebView.m Implemented stopLoading 2016-04-22 08:15:25 -07:00
RCTWebViewManager.h [ReactNative] s/ReactKit/React/g 2015-03-26 02:42:24 -08:00
RCTWebViewManager.m Implemented stopLoading 2016-04-22 08:15:25 -07:00
RCTWrapperViewController.h Added mechanism for directly mapping JS event handlers to blocks 2015-09-02 06:11:24 -08:00
RCTWrapperViewController.m Automatically adjust content inset after view controller did layout subviews 2015-09-04 07:00:21 -08:00
UIView+Private.h Perform clip update on RCTScrollView in increments of 50 pt 2015-08-13 07:56:41 -08:00
UIView+React.h Add debug tool to get shadowView from UIView 2016-03-16 10:18:22 -07:00
UIView+React.m Fix arc focus build 2016-03-22 10:58:29 -07:00