Commit Graph

4563 Commits

Author SHA1 Message Date
Lulu Wu abf079abb8 Make TTRC markers consistent between Bridge and Bridgeless
Summary:
The purpose of this change is to make TTRC markers work similarly for bridge loading and bridgeless loading so we could compare performance between them.

There are mainly four cases involved:
 ```REACT_BRIDGE_LOADING_START,
 REACT_BRIDGE_LOADING_END,
 REACT_BRIDGELESS_LOADING_START,
 REACT_BRIDGELESS_LOADING_END
```
First 2 are for beginning/ending of bridge loading which includes creating fragment, loading JS bundle, running JS bundle and creating react instance. Last 2 are for similar purpose with bridgeless.

Changelog: [Internal]

Reviewed By: lunaleaps

Differential Revision: D26514499

fbshipit-source-id: 65d6f3cc7de9e07a7a3a802dd77138e74c23aa5b
2021-02-22 12:42:44 -08:00
generatedunixname89002005325676 c498c055a2 Daily arc lint --take CLANGFORMAT
Reviewed By: zertosh

Differential Revision: D26480949

fbshipit-source-id: 5a8f706daaea276865e6eb8602cc3b50c484bf6f
2021-02-17 04:24:39 -08:00
Joshua Gross e810291790 Subtle stopSurface lifecycle change
Summary:
Change lifecycle of stopSurface in a subtle way: mark the surface as stopped in Java first, then in Cxx (currently it happens in Cxx, then Java).

This will cause us / allow us to ignore the final mounting instructions for the Surface, which are all irrelevant since they just have to do with View removal.
We can rely on GC and `unmountReactApplication` to do all of this for us, and save some CPU cycles on stopSurface.

Changelog: [Internal]

Reviewed By: shergin

Differential Revision: D26469741

fbshipit-source-id: a7f81d44c3cb2138f0ab31feb38852910410c638
2021-02-16 14:48:28 -08:00
Joshua Gross 3357341347 When surface is stopped, reset View ID of ReactRootView
Summary:
If there's a JS/native crash and the surface is stopped, the ReactRootView could be reused when the surface is restarted (or potentially to show the errors in a logbox; I'm don't think that's possible, but not 100% sure).

Regardless, now it will crash in those cases because of T83802049. There's no reason to do that, so just mark the ReactRootView as explicitly unused once the surface is stopped.

Changelog: [Internal]

Reviewed By: ShikaSD

Differential Revision: D26469742

fbshipit-source-id: ee79c094393a8ae8b5c53f04c14b90bc8e1a5a17
2021-02-16 14:48:28 -08:00
Aditya Sharat 6a9bb45e09 Adds InternalNode#freeze() API
Summary:
Litho needs a new API which is called immediately before yoga begins layout calculations so that the InternalNode gets the opportunity to finalise itself; i.e. perform the last mutations and in effect avoid any more mutations to the hierarchy.

See D26373731 where the mutations from `Layout#collectResults` is moved back into the InternalNode.

Changelog: [Internal]  Adds new API to YogaNodeJNIBase

Reviewed By: SidharthGuglani

Differential Revision: D26373730

fbshipit-source-id: 471346d3444986ada91e86c95f5f9fb98bcd2fa6
2021-02-16 10:20:35 -08:00
Lulu Wu eaedb10755 Switch to using ViewManagerResolver for view managers
Summary:
Right now the FbReactInstanceDelegate provides a list of view managers to the instance during initialization, this means that we're basically eagerly loading all of the view manager classes.

In this change we use ViewManagerResolver instead.

Changelog:
[Android][Changed] - Move ViewManagerResolver into a seperate file

Reviewed By: mdvacca

Differential Revision: D26424214

fbshipit-source-id: 550ade31c256a56d6e32c463f112ea16dd55a218
2021-02-16 10:12:24 -08:00
Valentin Shergin 4324ca8122 Fabric: Using SurfaceHandler API in Binding.cpp on Android
Summary:
Now we use SurfaceHandler-based APIs to control surfaces in `Binding.cpp` on Android instead of using Scheduler-based APIs.

This is a transitional change; eventually, we will need to wrap C++ SurfaceHandler's into JNI wrappers. For now, it will allow to clean up the C++ part.

Changelog: [Internal] Fabric-specific internal change.

Reviewed By: JoshuaGross

Differential Revision: D26375641

fbshipit-source-id: 6f293e79cecf50de72294e90d5243ebb02d71236
2021-02-15 23:19:55 -08:00
David Vacca d71a0be6fa Release fix for race condition on startSurface
Summary:
This bug doesn't reproduce anymore in v301+. MC has been enabled since december

https://www.internalfb.com/intern/logview/details/facebook_android_javascripterrors/419f8892e7b1a02f205810219ddfc299/trends?selected-logview-tab=All%20Traces&drillstate={%22start%22:%22Thu,%2028%20Jan%202021%2000:59:54%20-0800%22,%22end%22:%22Thu,%2011%20Feb%202021%2000:59:54%20-0800%22,%22constraints%22:[{%22col%22:%22mid%22,%22op%22:%22==%22,%22vals%22:[%22419f8892e7b1a02f205810219ddfc299%22]}],%22context%22:%22facebook_android_javascripterrors%22,%22metric%22:%22count%22}

changelog: [internal] internal

Reviewed By: ShikaSD

Differential Revision: D26398484

fbshipit-source-id: ca85ca211f1a38aa2691f150956a27c878d243bc
2021-02-15 21:02:05 -08:00
Ramanpreet Nara c76070412f Move TurboModuleManager init outside JSIModules guard
Summary:
TurboModuleManager used to be provided by a JSIModules package. In D26193053 (https://github.com/facebook/react-native/commit/13f100f788063be2a30109c3f7fee386cb766ec4), we moved TurboModuleManager creation off JSIModules. However, we didn't move the creation outside the JSIModules guard. So, when there were no JSIModules registered, we simply wouldn't create the TurboModuleManager. This diff fixes that mistake.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D26380674

fbshipit-source-id: 66939d11205b1d2eccd8c3b59ca4782e90645cd9
2021-02-11 13:02:53 -08:00
Igor Klemenski c37d49492b Work around max path length during source build of RN Android (#30776)
Summary:
Building ReactAndroid from source on Windows has recently hit the limitation of maximum path lengths.
At build time, during the `:ReactAndroid:buildReactNdkLib` task, the linker tries to access several of the intermediate binaries located deep in the tmp folder hierarchy, eg.
```
D:\r\ReactAndroid\build\tmp\buildReactNdkLib/local/armeabi-v7a/objs/react_render_components_progressbar/D_/r/ReactAndroid/__/ReactCommon/react/renderer/components/progressbar/android/react/renderer/components/progressbar/AndroidProgressBarMeasurementsManager.o
```
**Suggested fix:** for modules such as `react_render_components_progressbar` and `react_render_components_picker`, rename them to `rrc_progressbar` etc.

**NOTE**: this assumes that the fix from https://github.com/facebook/react-native/issues/30535 is in place. This regression happened while https://github.com/facebook/react-native/issues/30535 has been pending checkin.

**Other mitigations I've tried:**
- setting [`LOCAL_SHORT_COMMANDS`](https://developer.android.com/ndk/guides/android_mk#local_short_commands) for the problematic modules or `APP_SHORT_COMMANDS` for the root project. Turns out those commands don't work on the NDK version RN requires, but even after manually applying a [patch ](https://android-review.googlesource.com/c/platform/ndk/+/1126440) to my local copy of the NDK, these flags had no effect.
- moving the repo directory higher in the file system tree, and using short directory names `D:\r\...` was not enough
- creating virtual drive letters for specific long paths with the [`sust`](https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/subst#examples) command is not workable, since they depend on the source folder structure, and get partly generated by the build system, which I can't plug into
- just enabling long path support on Windows is not enough, since the compiler toolchain doesn't support them.
## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://github.com/facebook/react-native/wiki/Changelog
-->

[Android] [Fixed] - Fix source build on Windows machines vol. 2

Pull Request resolved: https://github.com/facebook/react-native/pull/30776

Test Plan:
Run `.\gradlew installArchives`

Before:
![image](https://user-images.githubusercontent.com/12816515/105435667-a1e15d00-5c12-11eb-9fcd-d0c278aaf477.png)
Now:
![image](https://user-images.githubusercontent.com/12816515/105435741-c2a9b280-5c12-11eb-88d5-a69ae56bbf50.png)

Differential Revision: D26194286

Pulled By: mdvacca

fbshipit-source-id: 778b5a0515148e2ace19e7902f74301831ebed94
2021-02-11 12:32:33 -08:00
Lulu Wu 9d1e8897e0 Load Logbox module for venice
Summary:
1, Add logbox module to BridgelessReactPackage for loading by TurboModleManager
2, Implement createRootView for creating venice's logbox
3, Move setting reactcontext and devsupportmanager for FbReactFragment into onReactContextInitialized()
4, Fix some nullability warnings

Changelog: [Internal]

Reviewed By: PeteTheHeat

Differential Revision: D26370269

fbshipit-source-id: 016f1dab8387d3766b2fd24d6e88f14538f443ea
2021-02-10 19:47:44 -08:00
Joshua Gross 81810f4c62 Add invariant to SurfaceMountingManager: when removing a view, the parent View must be a ViewGroup
Summary:
In addViewAt, we have this check. Add this same check to removeViewAt.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D26381475

fbshipit-source-id: 1050377aa4e528668446fd561ff09c61f27c700f
2021-02-10 16:03:10 -08:00
Andrei Shikov 5ca832b4aa Fix Android tests for touch events
Summary:
Updates Android tests to pass the tests [failing on CircleCI](https://app.circleci.com/pipelines/github/facebook/react-native/8047/workflows/50c356d0-f9a4-4909-b4e7-cad3b4bb6c57/jobs/188224/steps).

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D26368501

fbshipit-source-id: 61d4fdbc22cec2e397e365e415a08dbbc01cef09
2021-02-10 09:22:48 -08:00
David Vacca ff3c1307ff Remove out of date TODO
Summary:
Remove out of data TODO

changelog: [internal] internal

Reviewed By: PeteTheHeat

Differential Revision: D26144400

fbshipit-source-id: c5a97ce98cd7251e40adc15c16fceed4b9c76f81
2021-02-09 23:19:28 -08:00
David Vacca 8b72941a0a Add debug logs to check for overflow
Summary:
In this diff I'm adding debug assertions to verify that there are no overflows when muptiplying layout metrics by the pointScaleFactor

Ideally these should crash the app, but I'm trying to be conservative.

changelog: [internal] internal

Reviewed By: JoshuaGross

Differential Revision: D26297396

fbshipit-source-id: 068c60f4d89ea9cfd04a2e2174da2043ae150928
2021-02-09 23:19:27 -08:00
Joshua Gross e0f1101e7e Add invariant to SurfaceMountingManager: Views must not have parents when they are inserted
Summary:
We have no evidence of this happening on Android, but we are hitting a similar invariant on iOS. Adding this to Android for debugging purposes.

For now it's a SoftException to catch in debug and capture information; if we don't hit this prod at all, we'll elevate to a hard crash.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D26281585

fbshipit-source-id: 8ea9cf3ac555b13bf311f24c81bbbbc2845521d5
2021-02-09 22:43:43 -08:00
David Vacca 41f93679d0 Update C++ flags in Fabric Android
Summary:
Update C++ flags in Fabric Android

changelog: [internal] internal

Reviewed By: JoshuaGross

Differential Revision: D26297398

fbshipit-source-id: d4603ee848abee98977ac9e21505547d9a867e21
2021-02-08 11:37:35 -08:00
David Vacca d79212120b Clean listeners during destroy of ReactContext
Summary:
This diff cleans listeners on the destruction of the ReactContext.

changelog: [inernal] internal

Reviewed By: JoshuaGross

Differential Revision: D26259929

fbshipit-source-id: 1843cabdac2fa3e67dcc890afd923b82472d8f66
2021-02-06 23:05:28 -08:00
David Vacca 98165a23f6 Clear internal maps of NativeModuleRegistry during turn down of the bridge
Summary:
This diff clears the internal maps of NativeModuleRegistry during turn down of the bridge.

This is necessary for a proper cleanup of these modules.

changelog: [internal] internal

Reviewed By: ShikaSD

Differential Revision: D26239303

fbshipit-source-id: 6e98e5db60a4f54d02e99b03339b03c17ecc183d
2021-02-06 23:05:28 -08:00
David Vacca 1e8c3e4ad8 Unregister UIManagerModule from LifecycleEventListener
Summary:
This diff unregisters the UIManagerModule from LifecycleEventListener during turn down of the bridge.

changelog: [internal] internal

Reviewed By: JoshuaGross

Differential Revision: D26239156

fbshipit-source-id: b230949228c6e580cca088c395b970a3cff94839
2021-02-06 23:05:28 -08:00
David Vacca d7191f80e8 Configure MC before the JS Bundle is loaded
Summary:
This diff setup a global variable to control the staticViewConfig experiment before the bundle is loaded.

This global variable only has a meaning when RN uses a Bridge

changelog: [internal]

Reviewed By: JoshuaGross

Differential Revision: D26237670

fbshipit-source-id: 25ae63f36fba9c1e640ab2e70de88b71452ad8e6
2021-02-06 23:05:27 -08:00
David Vacca 33c390a7da Deallocate EventDispatcher in FabricUIManager when StaticViewConfigs are enabled
Summary:
This diff refactor the initialization and deallocation of EventDispatcher in FabricUIManager when StaticViewConfigs are enabled.

The goal of this diff is to make sure that the EventDispatcher is deallocated correctly when using StaticViewConfigs

changelog: [internal]

Reviewed By: JoshuaGross

Differential Revision: D26166413

fbshipit-source-id: e5bdad7ba923edc677c6b73f3a4d1271941f41cc
2021-02-06 23:05:27 -08:00
Albert Sun b474be6cc8 Back out "Make NativeModules immediately initializable"
Summary:
This caused a few apps to crash on launch.

Changelog: [Android][Fixed] - Crashes due to "Make NativeModules immediately initializable"

Reviewed By: olegbl

Differential Revision: D26278594

fbshipit-source-id: 969a3dc49a843366c4ae6ed19a9233d1e6f39b13
2021-02-05 10:16:25 -08:00
Andrei Shikov 6061b79283 Clear enable_android_surface_clear_after_crash_report and disable_view_operations_after_catalyst_destroy
Summary: Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D26238985

fbshipit-source-id: 5aa1172e73dd6623e2af1acd909e1548e37e8f30
2021-02-05 07:01:10 -08:00
Sidharth Guglani 96bc33a1d7 instance of checks for YogaNodeJniBase
Summary:
Changelog:
[Internal][Yoga] - Added instance of checks in `YogaNodeJNIBase` class to prevent `ClassCastException`s. This was happening for some NT android tests - Mocked Yoga Node object was being passed in the `addChildAt` api

Stack Trace of exception
    java.lang.ClassCastException: com.facebook.yoga.YogaNode$MockitoMock$1408896622 cannot be cast to com.facebook.yoga.YogaNodeJNIBase
	at com.facebook.yoga.YogaNodeJNIBase.addChildAt(YogaNodeJNIBase.java:86)
	at com.facebook.litho.DefaultInternalNode.addChildAt(DefaultInternalNode.java:220)
	at com.facebook.litho.DefaultInternalNode.child(DefaultInternalNode.java:377)
	at com.facebook.litho.DefaultInternalNode.child(DefaultInternalNode.java:360)
	at com.facebook.litho.Column.resolve(Column.java:118)
	at com.facebook.litho.Layout.create(Layout.java:172)

Reviewed By: Andrey-Mishanin

Differential Revision: D26114992

fbshipit-source-id: 774a689609e67f9244b81c6788b62cd61cd96d14
2021-02-05 03:42:50 -08:00
Joshua Gross 5ae8e84dc7 Fix IntBufferMountItem optimization + LayoutAnimation bug
Summary:
The new IntBufferMountItem queueing actually enforces a global ordering of mutation types: CREATEs, then INSERT, then REMOVE, then UPDATE, then DELETE.

See comments for more details. In general this ordering is fine, but if a DELETE animation is in progress and (due to view unflattening) the same view is recreated, the CREATE will be executed and then the in-process DELETE (since conflicting animations get flushed).

To mitigate this, in Binding we detect this and simply remove DELETE operations queued when we detect that we want to CREATE the node. `DELETE...CREATE` is valid but `CREATE...DELETE` in a single frame is not, so this is safe.

This does complicate and add more assumptions to Binding than I would like, but it should unblock us for now.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D26271299

fbshipit-source-id: 9453fe17b8b541e484a047dc9637674dbdcc8e9a
2021-02-05 00:57:40 -08:00
Valentin Shergin fc24bb4af0 Fabric: Support for setIsJSResponder, all the native changes
Summary:
This is a Fabric-compliant implementation of `JSResponder` feature. To make it work e2e we also need to update FabricRenderer in React repository. But before we can do this, we need to ship the native changes.

Changelog: [Internal] Fabric-specific internal change.

Reviewed By: mdvacca

Differential Revision: D24630027

fbshipit-source-id: 70c30e1250b554d83862956b536714704093072f
2021-02-04 13:16:29 -08:00
Ramanpreet Nara 2bf866e401 Make NativeModules immediately initializable
Summary:
## Problem:
NativeModules can only be initialized after we mark them initializable on the NativeModules thread. This work is scheduled in ReactInstanceManager.setupReactContext(), after we schedule the execution of the JS bundle on the JavaScript thread in ReactInstanceManager.createReactContext():

https://www.internalfb.com/intern/diffusion/FBS/browse/master/xplat/js/react-native-github/ReactAndroid/src/main/java/com/facebook/react/ReactInstanceManager.java?commit=9b58f58b8eb12281567b8d24d6d000e868e61a1f&lines=1256-1257%2C1331%2C1334-1335%2C1333-1334

So, if the timings don't work out, the JavaScript thread could start executing the JS bundle before the NativeModule thread makes all NativeModules initializable. In this case, those NativeModule will just appear to be null in C++/JavaScript.

## Fix
This diff makes all NativeModules initializable immediately after  their ModuleHolder is created. ModuleHolder.markInitializable() simply initializes initializes modules that were eagerly created.

Changelog: [Android][Fixed] - Make NativeModules immediately initializable

Reviewed By: JoshuaGross

Differential Revision: D26233372

fbshipit-source-id: a9223ff093da5b80781169be88e6ec9516c7a29b
2021-02-03 18:42:43 -08:00
Lulu Wu 5d8e75937d Rename "ReactInstanceManagerDevHelper" to "ReactInstanceDevHelper" so it doesn't look like Bridge-specific
Summary: Changelog: [Internal]

Reviewed By: PeteTheHeat

Differential Revision: D26199747

fbshipit-source-id: c6fe7d07e15940d08cc726c6631dd387910b40a0
2021-02-03 14:39:40 -08:00
Ramanpreet Nara 77ba2ad2f2 Delete NewJavaNativeModule
Summary:
`xbgs NewJavaNativeModule` shows this isn't used anywhere.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D26230382

fbshipit-source-id: daf9501115b1c094d22128144b5ebc29ae39c429
2021-02-03 13:50:05 -08:00
Ramanpreet Nara 13f100f788 Move TurboModuleManager creation into ReactInstanceManager
Summary:
See title.

Changelog: [Android][Changed] - Move TurboModuleManager creation into ReactInstanceManager

Reviewed By: mdvacca

Differential Revision: D26193053

fbshipit-source-id: fe92636f0cb3dca65fa919ac5df8931b693f76c5
2021-02-02 20:50:31 -08:00
Ramanpreet Nara eb7e89e286 Register TurboModuleManagerDelegate builders without JSIModules
Summary:
How does an application register a TurboModuleManagerDelegate with ReactInstanceManager?
1. Call ReactInstanceManagerBuilder.setReactPackageTurboModuleManagerDelegateBuilder(ReactPackageTurboModuleManagerDelegate.Builder)
2. Override ReactNativeHost.getReactPackageTurboModuleManagerDelegateBuilder()

Changelog: [Android][Added] - Introduce API to allow applications to register TurboModuleManagerDelegates with ReactInstanceManager

Reviewed By: mdvacca

Differential Revision: D26193055

fbshipit-source-id: bf82e63e6ab1c0c8f12bada92ac6852c992ec9cb
2021-02-02 20:50:30 -08:00
Ramanpreet Nara 2a1b5193f7 Allow ReactInstanceManager to create TurboModuleManager
Summary:
Previously, owner(TurboModuleManager) used to depend on owner(ReactInstanceManager). Now, owner(ReactInstanceManager) depends on owner(TurboModuleManager).

**Rationale:** This allows ReactInstanceManager to create TurboModuleManager.

## Changes
We moved ReactPackageTurboModuleManagerDelegate to com.facebook.react.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D26163661

fbshipit-source-id: 3ebff16ef2aa77e20bb55500ed44c9214acb91dd
2021-02-02 20:50:30 -08:00
Joshua Gross b0ec350568 Detect startSurface race-conditions and warn silently
Summary:
Crash in debug, log a warning and continue in production.

Changelog: [Internal]

Differential Revision: D26133167

fbshipit-source-id: 60279363a3e90d592e7ddbde188c13cda89c28c6
2021-01-28 16:22:06 -08:00
Joshua Gross aad423d59e Support RCTModernEventEmitter+RCTEventEmitter in ReactSwitchEvent Event class
Summary:
Support RCTModernEventEmitter+RCTEventEmitter in an Event class(es). This improves perf in Fabric. Migrate any constructor callsites to the new constructor and deprecate the previous one.

Changelog: [Internal]

Reviewed By: PeteTheHeat, mdvacca

Differential Revision: D26056823

fbshipit-source-id: 1d25afb2d4cfd7e539214d4592e361260f98fc56
2021-01-28 14:07:31 -08:00
Joshua Gross 1dcb4cfe7f Support RCTModernEventEmitter+RCTEventEmitter in RefreshEvent Event class
Summary:
Support RCTModernEventEmitter+RCTEventEmitter in an Event class(es). This improves perf in Fabric. Migrate any constructor callsites to the new constructor and deprecate the previous one.

Changelog: [Internal]

Reviewed By: PeteTheHeat, mdvacca

Differential Revision: D26056815

fbshipit-source-id: d0e03a69f84de47385e064c74f0a79c52c61022d
2021-01-28 14:07:31 -08:00
Joshua Gross a8d7c2cd62 Support RCTModernEventEmitter+RCTEventEmitter in PickerItemSelectEvent Event class
Summary:
Support RCTModernEventEmitter+RCTEventEmitter in an Event class(es). This improves perf in Fabric. Migrate any constructor callsites to the new constructor and deprecate the previous one.

Changelog: [Internal]

Reviewed By: PeteTheHeat, mdvacca

Differential Revision: D26056813

fbshipit-source-id: e3b0132fac6335e83ff5b1992424edcb98703803
2021-01-28 14:07:31 -08:00
Joshua Gross f6af7b2a58 Support RCTModernEventEmitter+RCTEventEmitter in ReactSlidingCompleteEvent Event class
Summary:
Support RCTModernEventEmitter+RCTEventEmitter in an Event class(es). This improves perf in Fabric. Migrate any constructor callsites to the new constructor and deprecate the previous one.

Changelog: [Internal]

Reviewed By: PeteTheHeat, mdvacca

Differential Revision: D26056808

fbshipit-source-id: aa7ff9520a6a2470c642f06797757e1c0362abe9
2021-01-28 14:07:31 -08:00
Joshua Gross 6e62100297 Support RCTModernEventEmitter+RCTEventEmitter in ReactContentSizeChangedEvent Event class
Summary:
Support RCTModernEventEmitter+RCTEventEmitter in an Event class(es). This improves perf in Fabric. Migrate any constructor callsites to the new constructor and deprecate the previous one.

Changelog: [Internal]

Reviewed By: PeteTheHeat, mdvacca

Differential Revision: D26056802

fbshipit-source-id: 72eb498673aecce48145c785a4c2a48e0432059d
2021-01-28 14:07:30 -08:00
Joshua Gross e253a6940d Support RCTModernEventEmitter+RCTEventEmitter in TouchEvent Event class
Summary:
Support RCTModernEventEmitter+RCTEventEmitter in an Event class(es). This improves perf in Fabric. Migrate any constructor callsites to the new constructor and deprecate the previous one.

Changelog: [Internal]

Reviewed By: PeteTheHeat, mdvacca

Differential Revision: D26056725

fbshipit-source-id: 771e5dd4cd1aeca3d2afd1a67ee58b9ac21eda79
2021-01-28 14:07:30 -08:00
Joshua Gross db5bc2f766 Support RCTModernEventEmitter+RCTEventEmitter in ShowEvent Event class
Summary:
Support RCTModernEventEmitter+RCTEventEmitter in an Event class(es). This improves perf in Fabric. Migrate any constructor callsites to the new constructor and deprecate the previous one.

Changelog: [Internal]

Reviewed By: PeteTheHeat, mdvacca

Differential Revision: D26056723

fbshipit-source-id: c20183a4a1189f13b15a138968937080888a200b
2021-01-28 14:07:30 -08:00
Joshua Gross 1575e7ffe3 Support RCTModernEventEmitter+RCTEventEmitter in ScrollEvent Event class
Summary:
Support RCTModernEventEmitter+RCTEventEmitter in an Event class(es). This improves perf in Fabric. Migrate any constructor callsites to the new constructor and deprecate the previous one.

Changelog: [Internal]

Reviewed By: PeteTheHeat, mdvacca

Differential Revision: D26056720

fbshipit-source-id: f36a6caf4e748c915b66f66fd9b4cad6826ecacf
2021-01-28 14:07:30 -08:00
Joshua Gross 583d6229c6 Support RCTModernEventEmitter+RCTEventEmitter in RequestCloseEvent Event class
Summary:
Support RCTModernEventEmitter+RCTEventEmitter in an Event class(es). This improves perf in Fabric. Migrate any constructor callsites to the new constructor and deprecate the previous one.

Changelog: [Internal]

Reviewed By: PeteTheHeat, mdvacca

Differential Revision: D26056714

fbshipit-source-id: 215d8e44d7909f30f4a45f57e5d22a32a635d0ba
2021-01-28 14:07:29 -08:00
Joshua Gross 42274b0ba8 Support RCTModernEventEmitter+RCTEventEmitter in ReactTextInputSubmitEditingEvent Event class
Summary:
Support RCTModernEventEmitter+RCTEventEmitter in an Event class(es). This improves perf in Fabric. Migrate any constructor callsites to the new constructor and deprecate the previous one.

Changelog: [Internal]

Reviewed By: PeteTheHeat, mdvacca

Differential Revision: D26056700

fbshipit-source-id: b3452125678ec8770dec9587106b8bf0f2490027
2021-01-28 14:07:29 -08:00
Joshua Gross ae979a14d6 Support RCTModernEventEmitter+RCTEventEmitter in ReactTextInputSelectionEvent Event class
Summary:
Support RCTModernEventEmitter+RCTEventEmitter in an Event class(es). This improves perf in Fabric. Migrate any constructor callsites to the new constructor and deprecate the previous one.

Changelog: [Internal]

Reviewed By: PeteTheHeat, mdvacca

Differential Revision: D26056696

fbshipit-source-id: 50c0f01164e078b0ad32f66dda80c965f731f1fb
2021-01-28 14:07:29 -08:00
Joshua Gross 2b0d69976f Support RCTModernEventEmitter+RCTEventEmitter in ReactTextInputKeyPressEvent Event class
Summary:
Support RCTModernEventEmitter+RCTEventEmitter in an Event class(es). This improves perf in Fabric. Migrate any constructor callsites to the new constructor and deprecate the previous one.

Changelog: [Internal]

Reviewed By: PeteTheHeat, mdvacca

Differential Revision: D26056690

fbshipit-source-id: 208982ca5b53985bd8079c4b206a7eb4bb883494
2021-01-28 14:07:28 -08:00
Joshua Gross 8e2b45fe79 Support RCTModernEventEmitter+RCTEventEmitter in ReactTextInputFocusEvent Event class
Summary:
Support RCTModernEventEmitter+RCTEventEmitter in an Event class(es). This improves perf in Fabric. Migrate any constructor callsites to the new constructor and deprecate the previous one.

Changelog: [Internal]

Reviewed By: PeteTheHeat, mdvacca

Differential Revision: D26056685

fbshipit-source-id: a9abb451e62c9e378b0a5667fa4c5f82952bd02b
2021-01-28 14:07:28 -08:00
Joshua Gross a5a94ce786 Support RCTModernEventEmitter+RCTEventEmitter in ReactTextInputEvent Event class
Summary:
Support RCTModernEventEmitter+RCTEventEmitter in an Event class(es). This improves perf in Fabric. Migrate any constructor callsites to the new constructor and deprecate the previous one.

Changelog: [Internal]

Reviewed By: PeteTheHeat, mdvacca

Differential Revision: D26056680

fbshipit-source-id: 2a57f15c01a585af9ddbe08cf6dd60922d4f64b3
2021-01-28 14:07:28 -08:00
Joshua Gross 346b1f1df4 Support RCTModernEventEmitter+RCTEventEmitter in ReactTextInputEndEditingEvent Event class
Summary:
Support RCTModernEventEmitter+RCTEventEmitter in an Event class(es). This improves perf in Fabric. Migrate any constructor callsites to the new constructor and deprecate the previous one.

Changelog: [Internal]

Reviewed By: PeteTheHeat, mdvacca

Differential Revision: D26056676

fbshipit-source-id: 6baa5d9ba0ef15218ce02cbb51862f18d98b465c
2021-01-28 14:07:28 -08:00
Joshua Gross a01cea10f6 Support RCTModernEventEmitter+RCTEventEmitter in ReactTextInputBlurEvent Event class
Summary:
Support RCTModernEventEmitter+RCTEventEmitter in an Event class(es). This improves perf in Fabric. Migrate any constructor callsites to the new constructor and deprecate the previous one.

Changelog: [Internal]

Reviewed By: PeteTheHeat, mdvacca

Differential Revision: D26056672

fbshipit-source-id: 2f3e4b9bbed339f15b22fe87e27d81af083fd481
2021-01-28 14:07:27 -08:00