Commit Graph

4574 Commits

Author SHA1 Message Date
Ron Edelstein 8b4e2ac8e5 Explicitly set autoglob (long tail)
Reviewed By: fbanurag, strulovich

Differential Revision: D25620908

fbshipit-source-id: 1dd737d451ddfd07baa427902bdf1c96d7e67e64
2020-12-17 19:35:29 -08:00
Ramanpreet Nara 5c4f145e33 Roll out TurboModule Promise Async Dispatch
Summary:
## Context
The legacy NativeModule infra implements promise methods using [async NativeModule method calls](https://fburl.com/diffusion/tpkff6vg). In the TurboModule infra, promise methods [treat as sync methods](https://fburl.com/diffusion/yde7xw71), and executed directly on the JavaScript thread. This experiment makes TurboModule promise methods async, and dispatches them to the NativeModules thread, when they're executed from JavaScript.

Reviewed By: fkgozali

Differential Revision: D25623192

fbshipit-source-id: 2b50d771c5272af3b6edf150054bb3e80cab0040
2020-12-17 17:27:09 -08:00
Ramanpreet Nara 40115d87d4 Roll out package info validation
Summary:
## Context
Every time we require a NativeModule in Java, we [first try to create it with the TurboModuleManager](https://fburl.com/diffusion/3nkjwea2). In the TurboModule infra, when a NativeModule is requested, [we first create it](https://fburl.com/diffusion/d2c6iout), then [if it's not a TurboModule, we discard the newly created object](https://fburl.com/diffusion/44gjlo6y). This is extremely wasteful, especially when a NativeModule is requested frequently and periodically, like UIManagerModule.

Therefore, in D24811838 (https://github.com/facebook/react-native/commit/803a26cb003e6b790e3a1ab31beb0c95795fff0c) fkgozali launched a fix to the infra that would avoid creating the non-TurboModule object in the first place. Today, we're launching this optimization.

Reviewed By: fkgozali

Differential Revision: D25621570

fbshipit-source-id: dedba4d5ac6fcf2ec3c31e7163a6a226065c708b
2020-12-17 17:27:09 -08:00
David Vacca 5a37773e53 Fix race condition in FabricUIManager.StartSurface method
Summary:
This diff fixes a race condition in the execution of FabricUIManager.StartSurface method.
The rootcause is that startSurface is executing getViewportOffset from a background thread.

changelog: [internal]

Reviewed By: shergin

Differential Revision: D25617154

fbshipit-source-id: 9351201088164e74bb0b9454e30651e1de0da912
2020-12-17 16:18:13 -08:00
doniwinata0309 b4c9f13fe7 Remove Okhttp3 Android Proguard Rules (#30514)
Summary:
Remove proguard keep rules on okhttp3. The library already contains its own consumer proguard --> see https://square.github.io/okhttp/r8_proguard/

The keep rules will increase the final apk size of android app. Currently, there is no way to disable proguard rules from transitive dependencies ( https://issuetracker.google.com/issues/37073777). So any android app that use react native will also contains this proguard rules.

## Changelog

[Android] [Removed] - Remove okhttp3 proguard rules

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

Test Plan: n/a

Reviewed By: mdvacca

Differential Revision: D25616704

Pulled By: fkgozali

fbshipit-source-id: eb0bcbc4ace398a55ce6902e34c17b030bb87130
2020-12-17 09:41:17 -08:00
Keion Anvaripour 4537131878 Bytecode client for Android (#30595)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/30595

Changelog: [Internal]

Add support for loading HBC bundles from Metro in Twilight.
* adds `runtimeBytecodeVersion` to the bundleURL
* adds logic to check chunk hermes bytecode bundles
* adds support for running the bytecode bundles

Reviewed By: cpojer

Differential Revision: D24966992

fbshipit-source-id: acdd03a2e9e2b3e4c29c99c35a7c9136a3a7ef01
2020-12-16 16:03:57 -08:00
Joshua Gross 47a9d18912 Delete LayoutAnimations gating code and related dead code
Summary:
Ship LayoutAnimations to 100% of users by removing feature-flag gating.

The `collapseDeleteCreateMountingInstructions_` stuff is always disabled for LayoutAnimations, so we can get rid of that too.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D25510740

fbshipit-source-id: 71bac44f829530458e4906ecd1e7e68e766de2ec
2020-12-12 03:40:30 -08:00
Ron Edelstein 933cef6d9a More explicit marking of autoglob as False
Summary:
In preparation for flipping the default, marking autoglob as False in places where it isn't explicitly specified.

Changelog: [Internal]

Reviewed By: strulovich

Differential Revision: D25497305

fbshipit-source-id: 142e5caca2d67efcb3c25067a36934f7f6dd4b21
2020-12-11 16:45:55 -08:00
Ramanpreet Nara d8c84d3a65 Make Metro work with Venice
Summary:
Now, Metro should work with Venice. This piggybacks on Lulu's fix here: D22477500 (https://github.com/facebook/react-native/commit/9b8ffeee4c54eb05ca74d626b171a958fa6db4d4).

Changelog: [Internal]

Reviewed By: ejanzer

Differential Revision: D25323041

fbshipit-source-id: 859958185c5be52a4bfdc12a82ecd7719042ae5f
2020-12-11 10:51:35 -08:00
Kevin Gozali 072896e3b7 Android: introduced uimanager/interfaces target for base symbols used by codegen output
Summary:
Some of the existing files under uimanager/ are self contained and used by the component codegen output. This commit split out those files into a dedicated uimanager/interfaces/ dir/target so that more targets can depend on it without causing dep cycle.

Also, the component codegen output doesn't need LayoutShadowNode at all, so this removed the import.

This will allow us to combine the Java codegen output for TM spec and Fabric components, simplifying build and dependency management (not in this commit yet).

Changelog: [Internal]

Reviewed By: JoshuaGross

Differential Revision: D25451409

fbshipit-source-id: 827545a3d78ebed1815cf9e52da2fa896b012aa1
2020-12-10 00:06:21 -08:00
Joshua Gross c1f9a4562c Remove clipChildRectsIfOverflowIsHidden feature flag and associated code
Summary:
The flag `clipChildRectsIfOverflowIsHidden` has been set to false for a little over a year. Delete it and associated callsites.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D25451696

fbshipit-source-id: a6067b2e25124f6bdef336c2ddead719dd44cca9
2020-12-09 21:17:25 -08:00
Joshua Gross 7f0373d4ff Remove enableExperimentalStateUpdateRetry feature flag
Summary:
In practice this has been enabled in production for months and is fine. Remove feature-flag and gating.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D25451697

fbshipit-source-id: 9e70db3ed4e00de7b8295d9225d43ba09e4e68e9
2020-12-09 21:17:25 -08:00
Joshua Gross 4690effc5c Remove enableSpannableCacheByReadableNativeMapEquality flag
Summary:
This has been true for 100% of users for months; clean up the old code.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D25451470

fbshipit-source-id: feae59ce746869b9d84d6aaa69be10e91181f03a
2020-12-09 21:17:25 -08:00
Joshua Gross 4bc40bf8e6 Remove code no longer needed for debugging T78035906
Summary:
This code was useful for debugging T78035906 but is no longer needed.

I'm a bit conflicted about removing it, since such issues could crop up again in the future - but they're very rare, and hopefully now we know how to avoid them.

tl;dr: Make sure that mount instructions are not executed *during* a draw or measure.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D25450846

fbshipit-source-id: e261f13db252d22773e373a5de744ecc8c380a43
2020-12-09 21:17:24 -08:00
Joshua Gross e020c6c0a7 Removing gating code for Fabric; don't initialize ViewGroupDrawingOrderHelper for RVG in Fabric
Summary:
This code and this class isn't needed in Fabric, so don't create it during construction. Lazy-load it when it's needed outside of Fabric.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D25450724

fbshipit-source-id: d14d8f03c194716f2aba0e499f3282ad2d1c1d29
2020-12-09 21:17:24 -08:00
David Vacca 8c013173f8 Remove double lookup of UIManager
Summary:
Remove double lookup of UIManager, cast of null returns null.

changelog: [internal]

Reviewed By: ejanzer

Differential Revision: D25453878

fbshipit-source-id: c727c15fa787981eb5bf02006184e14cfab319c6
2020-12-09 20:59:31 -08:00
David Vacca 3ac7a4d6ba Prevent ReactRootView to load UIManagerModule when running with Fabric Enabled
Summary:
Prevent ReactRootView to load UIManagerModule when running with Fabric Enabled

changelog: [Internal]

Reviewed By: ejanzer

Differential Revision: D25453879

fbshipit-source-id: 98e88db17a86ae60e14efb070df9b2da082ae127
2020-12-09 20:59:31 -08:00
David Vacca 9c827f6201 Prevent initialization of constants for view managers for users with static view config enabled
Summary:
This diff prevents the pre-calculation of ViewManager's constants for users with static view config enabled.
We still load viewManager classes and create viewManger objects for perf reasons

Changelog: [Internal]

Reviewed By: fkgozali

Differential Revision: D25414068

fbshipit-source-id: a91f6113e35b42625c03d13bd67b63e3f9f75098
2020-12-08 22:03:13 -08:00
Dulmandakh a4d8632890 cleanup release.gradle (#30468)
Summary:
Cleanup release.gradle and remove code used to upload RN to maven repository, which is not longer used. Also removed configuration to include Javadoc, Sources in maven repo, thus reduce NPM package size.

## Changelog

[Internal] [Changed] - cleanup and remove maven upload from release.gradle

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

Test Plan: you will no longer see *uploadArchives* in ./gradlew tasks. Also you can run **./gradlew :ReactAndroid:installArchives**

Reviewed By: mdvacca

Differential Revision: D25408128

Pulled By: fkgozali

fbshipit-source-id: b3ced1b466b9f11e3970136a116af4e29dbd33a1
2020-12-08 15:56:51 -08:00
Joshua Gross 99f2f5ffdd deleteRootView: use concurrent pattern with mTagToViewState
Summary:
Instead of doing a "containsKey then get", just get the rootViewTag and see if it's non-null. Theoretically, since it's a
concurrent data-structure, it could be removed from the ConcurrentHashMap between "containsKey" returning true and the "get".

This does not fix any known, existing problems.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D25378703

fbshipit-source-id: 62a44e68e4443dac5a557263cc4bb33de9eea993
2020-12-07 17:59:09 -08:00
Joshua Gross 3cdef265ae Remove premature optimization in FabricUIManager; could be causing stopSurface inconsistencies
Summary:
There is an optimization in FabricUIManager.surfaceActiveForExecution that ensures it returns the same value (true or false)
for a given SurfaceId for a single frame (the value is cached until the next frame).

It seems like this can be causing a few different crashes, in a couple different ways:

1) If StopSurface is called off the UI thread, in the middle of a batch of operations (probably less likely to cause problems)
2) If StopSurface is called on the UI thread, in between different operations; the latter operations will still execute because the `true` value of `surfaceActiveForExecution` was cached.

I don't think that this optimization was providing much for us, and could be causing crashes. Remove it for now and we'll analyze impact on crashes and perf.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D25379970

fbshipit-source-id: 2c15c971bd0c828e1d38a34662d93293271041b2
2020-12-07 17:10:00 -08:00
Riley Dulin 72d29ee7d7 Destroy jni::global_ref while inside a ThreadScope
Summary:
The `BlobCollector` native module stored a `jni::global_ref` as a member,
and its destructor automatically destroys it.
However, as noted in JSI documentation, there is no guarantee that the destructor
is run on a JVM-registered thread. The destructor knew this and used a `jni::ThreadScope`
to do some other JNI behavior, but the global_ref needs to be destroyed during
that ThreadScope as well.

Changelog: [Internal]

Reviewed By: neildhar

Differential Revision: D25372698

fbshipit-source-id: f4eba0b2da154c6eac54d7faeb9ea5bb9260bec9
2020-12-07 15:42:57 -08:00
David Vacca 5fb82e7425 Ensure ReactRootView.getId() is accessed on the UIThread
Summary:
Ensure ReactRootView.getId() is accessed on the UIThread

changelog: [internal] intenral

Reviewed By: JoshuaGross

Differential Revision: D25321379

fbshipit-source-id: 889e59c655324352a7b9ac5bed769750786b8190
2020-12-07 13:41:42 -08:00
David Vacca 503a6f4463 Optimize iteration of ReadableNativeMaps
Summary:
Props are transferred from C++ to Java using ReadableNativeMaps. The current implementation of ReadableNativeMaps creates an internal HashMap the first time one of its methods is executed.
During the update of props ReadableNativeMaps are consumed only once and they are accessed through an Iterator. That's why there is no reason to create the internal HashMap, which is inefficient from performance and memory point of view.

This diff creates an experiment that avoids the creation of the internal HashMap during prop updates, additionally it removes a lock that was being used in the creation of the internal HashMap. I expect this change to have a positive impact in TTRC and memory (in particular for ME devices)

This diff reduces the amount of ReadableNativeMaps's internal HashMaps created during initial render of MP Home by ~35%.

Changelog: [Internal]

Reviewed By: JoshuaGross

Differential Revision: D25361169

fbshipit-source-id: 7b6efda11922d56127131494ca39b5cec75f1703
2020-12-06 11:28:11 -08:00
David Vacca b636397a0d Add annotations and thread safety checks in the initialization / teardown methods of ReactInstanceManager
Summary:
Add annotations and thread safety checks in the initialization / teardown methods of ReactInstanceManager

changelog: [internal] internal

Reviewed By: JoshuaGross

Differential Revision: D25321380

fbshipit-source-id: 113a7c224ae04009cda9e15676208abcef6af211
2020-12-04 19:58:10 -08:00
David Vacca 74a756846f Fix race condition on startSurface
Summary:
The root cause of this bug is a race condition between the onMeasure method and setupReactContext.

ReactInstanceManager.attachRootView() method is responsible of the initialization of ReactRootViews and it is invoked by ReactRootView.onMeasure() method in the UIThread

Important initialization steps:
1. Clear the Id of the ReactRootView
2. Add the ReactRootView to the mAttachedReactRoots
3. Call StartSurface (if the bridge has been initialized)

Sometimes, when this method is invoked for the first time, the bridge is not initialized, in those cases we delay the start of the surface.

Once the bridge is initialized, StartSurface is called by the setupReactContext() running in the NativeModuleThread.

Since onMeasure can be called multiple times, it is possible that we call "StartSurface" twice for the same ReactRootView, causing the bug reported on T78832286.

This diff adds an extra check to prevent calling "StartSurface" twice. The fix is done using an AtomicInteger comparison and it is gated by the flag "enableStartSurfaceRaceConditionFix". Once we verify this works fine in production we will clean up the code, remove the flags and maybe revisit the API of ReactRoot.

changelog: [Android] Fix race-condition on the initialization of ReactRootViews

Reviewed By: JoshuaGross

Differential Revision: D25255877

fbshipit-source-id: ca8fb00f50e86891fb4c5a06240177cc1a0186d9
2020-12-04 19:58:10 -08:00
Ramanpreet Nara 374808f307 Delete redundant dependency in turbomodules/core:coreAndroid
Reviewed By: ejanzer

Differential Revision: D25274090

fbshipit-source-id: 6f18ebee410b0866d5c5f96cc80631116f4251ff
2020-12-04 12:00:01 -08:00
Andrei Shikov fbf37092a8 Disable non-Fabric view operations after catalyst instance is destroyed
Summary: Changelog: [Internal]

Reviewed By: JoshuaGross

Differential Revision: D25248836

fbshipit-source-id: 9afb0c18e7825d32857f746b038268758afaaaa8
2020-12-04 11:03:34 -08:00
Joshua Gross bd2b459561 Non-Fabric: ensure every requestLayout is followed by a performLayout
Summary: Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D25319526

fbshipit-source-id: 5527d90d84ef53847b1a478bfa16c27e3ca4720b
2020-12-04 00:29:42 -08:00
David Vacca 0d3aa35a03 remove unnecessary check
Summary:
EZ check to remove unnecessary check

changelog: [internal]

Reviewed By: JoshuaGross

Differential Revision: D25315988

fbshipit-source-id: a635ce9fd7ad50109bee55f82ccf3556cc7a4b0d
2020-12-03 20:50:01 -08:00
Xiaoyu Yin 7008ffb663 Protect methods from proguard
Summary:
These methods were being striped from proguard, which causes release builds to instacrash

Changelog: [Internal] Protect methods from Proguard

Reviewed By: RSNara

Differential Revision: D25314933

fbshipit-source-id: 173160eab953b7c24e02f5e6ef3bf335c1f85526
2020-12-03 16:42:55 -08:00
Joshua Gross 2e6eea8390 Remove enableStopSurfaceOnRootViewUnmount feature flag
Summary:
This feature flag (enableStopSurfaceOnRootViewUnmount) was used to gate usage of the "stopSurface" API, which is now fully supported, and has been used
in the FB app for several months. This is safe to ship in code.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D25275192

fbshipit-source-id: fa22bfd00aa023297bc19c83c138f133e9ff1645
2020-12-02 20:10:00 -08:00
Joshua Gross 067d2eee03 Remove enableDrawMutationFix feature flag and ship it
Summary:
This was added to prevent mutating the UI during draw or measure, and appears to have been effective. Keep the comments, ship the feature, remove flags.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D25258409

fbshipit-source-id: 36ad8a03d1eb82bc9dcd769372c03f1ebe8b8da8
2020-12-01 19:52:45 -08:00
Xiaoyu Yin b9b2215174 Add DoNotStrip annotations to TurboModulePerfLogger
Summary:
Prevent proguard from stripping these methods

Changelog: [Internal] Add DoNotStrip annotations to TurboModulePerfLogger

Reviewed By: RSNara

Differential Revision: D25101027

fbshipit-source-id: 673e97446a36fe0e8c10916aa7eb4c39c2187ba8
2020-11-30 14:15:24 -08:00
Emily Janzer c0a2998387 Move TurboModuleManager to use RuntimeExecutor instead of jsContext (#30416)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/30416

This diff changes the constructor param for TurboModuleManager from jsContext (a long representing the `jsi::Runtime` pointer) to a RuntimeExecutor. It also updates callsites to use the new RuntimeExecutor created by CatalystInstance. This is only used for installing the TurboModule JSI binding; it's not currently used for JS invocation in TurboModules, which is handled separately by JSCallInvoker. Ultimately we may be able to implement JSCallInvoker *with* the provided RuntimeExecutor, but there's some additional logic in JSCallInvoker that we don't have here yet.

Changelog: [Internal]

Reviewed By: RSNara

Differential Revision: D21338930

fbshipit-source-id: 1480c328f1a1776ddf22752510c0f3b35168a489
2020-11-20 14:32:59 -08:00
Tim Yung f6b8736b09 RN: Update ViewConfig for ScrollView
Summary:
Updates `ReactScrollViewManager` and the `ViewConfig` for `ScrollView` so that they are equivalent.

- `inverted` was missing.
- `contentOffset` was missing differ on Android. (However, there does not seem to be any perceivable behavior difference besides the native `ViewConfig` being different.)

Changelog:
[Internal]

Reviewed By: JoshuaGross

Differential Revision: D25084470

fbshipit-source-id: 8bea3b7a692c1038819a4147b174583a4faa71e9
2020-11-19 02:52:00 -08:00
Kevin Gozali 9eb23e741f Android OSS: Solve some Javadoc warning due to missing dependencies
Summary:
A bunch of deps were missing when generating Javadoc, producing warnings. One issue was:

```
project.getConfigurations().getByName("compile").asList()
```

Seems to be deprecated (?), so this list is always empty. The mitigation is to create a new configuration that just inherits from `api()` dependencies, so that we can add them in Javadoc task.

The other problem (not solved in this commit), is that some deps are .aar files, which require some manual unpacking before they can be processed: https://stackoverflow.com/questions/35853906/how-to-generate-javadoc-for-android-library-when-it-has-dependencies-which-are-a

Note that this is separate fix from https://github.com/facebook/react-native/pull/30417

Changelog: [Internal]

Reviewed By: JoshuaGross

Differential Revision: D25041164

fbshipit-source-id: 2ee8b268c2d38e3ecbf622c05c3c56123b7a15a6
2020-11-17 18:27:35 -08:00
Nick Gerleman b841ee6fb8 Fix :ReactAndroid:androidJavadoc task (#30417)
Summary:
Fixes https://github.com/facebook/react-native/issues/30415

This is a quick and dirty fix to unblock publish, of excluding a class from Javadoc generation that is importing a class current build logic cannot handle. This is not a long-term fix for the issue.

## 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
-->

[Internal] [Fixed] - Fix :ReactAndroid:androidJavadoc task

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

Test Plan: Tested that the task now completes locally.

Reviewed By: lunaleaps

Differential Revision: D25041282

Pulled By: fkgozali

fbshipit-source-id: f774ab30a09db473178e2a51c77860e4985dd8e3
2020-11-17 18:27:35 -08:00
Joshua Gross bbd0f03481 Removing pre-API 21 code
Summary:
We don't support pre-API 21/Android <5/pre-Lollipop anymore; delete related code or checks.

No need for this to make it to the changelog, this announcement was already made.

Changelog: [Internal]

Reviewed By: ejanzer

Differential Revision: D24965249

fbshipit-source-id: e537e62e8eb18878c29afe17b8c7861d095a37b7
2020-11-16 12:43:14 -08:00
Joshua Gross 752e7ab1f9 Experiment to replace Fabric MountItem lists with concurrent queues (re-land)
Summary:
Currently, queuing any sort of MountItem or getting the list of MountItems requires synchronization. Since these can be queued up at any point from the JS thread, there will, in theory, be constant contention between JS and UI thread.

To see if this is true, I'm creating an experiment instead of just switching over to concurrent structures. After seeing results, we can hopefully make a decision and delete the non-concurrent stuff or improve on it somehow.

The original was unlanded in D24973616 (https://github.com/facebook/react-native/commit/26787e2260412d9d2fe831e68a8616505d3cab36) due to a typo, which has been fixed now. The typo was that in Blocking Mode, we queued up all PreMountItems to the concurrent PreMountItems queue.

Changelog: [Internal]

Reviewed By: ShikaSD

Differential Revision: D24974851

fbshipit-source-id: d081c081bbd0de445bb92408f0ec822056b905a5
2020-11-14 12:19:56 -08:00
Andrei Shikov 26787e2260 Back out "Experiment to replace Fabric MountItem lists with concurrent queues"
Summary:
Changelog: [Internal]

Original commit changeset: fcbdeda51f91

Reviewed By: rubennorte

Differential Revision: D24973616

fbshipit-source-id: 4d21211d329c77dba50972a26b1daeccfffad912
2020-11-14 08:59:02 -08:00
Koichi Nagaoka d85d5d2e19 Fix cannot working Modal's onDismiss. (#29882)
Summary:
Fixes: https://github.com/facebook/react-native/issues/29455

Modal's onDismiss is not called on iOS.
This issue occurred the commit https://github.com/facebook/react-native/commit/bd2b7d6c0366b5f19de56b71cb706a0af4b0be43 and was fixed the commit https://github.com/facebook/react-native/commit/27a3248a3b37410b5ee6dda421ae00fa485b525c.
However, the master and stable-0.63 branches do not have this modified commit applied to 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
-->

[iOS] [Fixed] - Modal's onDismiss prop will now be called successfully.

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

Test Plan:
Tested on iOS with this change:

1. Set function Modal's onDismiss prop.
1. Set Modal's visible props is true. (show Modal)
1. Set Modal's visible props is false. (close Modal)
1. The set function in onDismiss is called.

Reviewed By: shergin

Differential Revision: D24648412

Pulled By: hramos

fbshipit-source-id: acf28fef21420117c845d3aed97e47b5dd4e9390
2020-11-13 23:56:09 -08:00
Joshua Gross 47000756fe Add more systrace sections to FabricJSIModuleProvider
Summary:
Adding more Systrace sections to get perf information during critical paths.

Changelog: [Internal]

Reviewed By: ejanzer

Differential Revision: D24960195

fbshipit-source-id: 099e9cfac8ac87287e48e9915e6b28fe7a448783
2020-11-13 21:53:37 -08:00
Joshua Gross c609952ddb Add Systrace sections to UIImplementationProvider
Summary:
Add Systrace sections to initialization of non-Fabric UIImplementationProvider. This path is sometimes invoked during startup of Fabric so I'd like to gather more information about its impact.

Changelog: [Internal]

Reviewed By: ejanzer

Differential Revision: D24959965

fbshipit-source-id: a8555b8db284d00f97c71ca859cb2020409cb110
2020-11-13 21:53:36 -08:00
Joshua Gross 66e536739e Add additional debug logging for startSurface crashes
Summary:
There are a very, very small number of crashes in production that are hitting this line. I would like to understand what the existing tag ID is (perhaps it's eqal to the ID being set, which would indicate "double-start"). If not, it indicates that fragments are being reused somewhere, or something else odd is going on with lifecycles.

Changelog: [Internal]

Reviewed By: ejanzer

Differential Revision: D24953785

fbshipit-source-id: 079c86cdb571749662cca46feeaebdd6cb1281f4
2020-11-13 21:53:36 -08:00
Joshua Gross 23def0f8f0 Experiment to replace Fabric MountItem lists with concurrent queues
Summary:
Currently, queuing any sort of MountItem or getting the list of MountItems requires synchronization. Since these can be queued up at any point from the JS thread, there will, in theory, be constant contention between JS and UI thread.

To see if this is true, I'm creating an experiment instead of just switching over to concurrent structures. After seeing results, we can hopefully make a decision and delete the non-concurrent stuff or improve on it somehow.

Changelog: [Internal]

Reviewed By: ejanzer

Differential Revision: D24942110

fbshipit-source-id: fcbdeda51f91f4bd430a20d7484854fb1e94a832
2020-11-13 21:53:36 -08:00
Dulmandakh 2798e7172b remove ReactFragmentActivity (#30331)
Summary:
Remove ReactFragmentActivity class, which was deprecated at least since 0.58.

## Changelog

[Android] [Changed] - remove ReactFragmentActivity class.

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

Reviewed By: makovkastar

Differential Revision: D24914082

Pulled By: fkgozali

fbshipit-source-id: 6833b76552a1fc19680f96501d4b8e2ff03c2c39
2020-11-13 09:55:40 -08:00
Joshua Gross f1fbfebccb Add ReactRootView perf markers
Summary:
Add three markers for ReactRootView perf logging: onMeasure, attachToReactInstanceManager, and updateLayoutSpecs.

It is suspected that one or all of these have regressed under Fabric in some cases.

Changelog: [Internal]

Reviewed By: shergin

Differential Revision: D24909635

fbshipit-source-id: 6b6c0cc792c4b2d72f2360d6cffc02ef00e8a88b
2020-11-12 15:54:58 -08:00
Joshua Gross 68126ed470 Skip execution of IntBufferBatchMountItem if surface has stopped
Summary:
Fixes crashes in surface teardown / navigating away from a surface.

Changelog: [Internal]

Reviewed By: shergin

Differential Revision: D24907216

fbshipit-source-id: 7bd7578c81687c7e64e8f70fecf8446bb333a1ed
2020-11-12 15:54:58 -08:00
Dulmandakh 96ace87791 remove android support library (#30347)
Summary:
This PR removes remains of Android Support Library, now replaced with AndroidX.

## Changelog

[Internal] [Changed] - remove Android Support Library from Buck

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

Test Plan: CI is green

Reviewed By: JoshuaGross

Differential Revision: D24914088

Pulled By: fkgozali

fbshipit-source-id: 0ff18dfd7c684642a5c27308112b6fddc27608a7
2020-11-12 09:14:29 -08:00