Commit Graph

4482 Commits

Author SHA1 Message Date
generatedunixname89002005325676 aebccd3f92 Daily arc lint --take CLANGFORMAT
Reviewed By: zertosh

Differential Revision: D25921551

fbshipit-source-id: df0445864751c18eaa240deff6a142dd791d32ff
2021-01-15 04:16:22 -08:00
generatedunixname89002005325674 0936e7fa9e Daily arc lint --take GOOGLEJAVAFORMAT
Reviewed By: zertosh

Differential Revision: D25921598

fbshipit-source-id: f82ab6a1a891dd6262bfa516f869850415ce3228
2021-01-15 04:12:28 -08:00
Ramanpreet Nara a156ee9b73 Delete JS TurboModule Codegen Gating
Summary: Changelog: [Internal]

Reviewed By: fkgozali

Differential Revision: D25915171

fbshipit-source-id: b59e21f834a7172055e180eddb9bf15737a6cf0f
2021-01-14 19:14:23 -08:00
Ramanpreet Nara 8ed6659907 Stop forwarding TurboModule schema to TurboModule HostObjects
Summary: Changelog: [Internal]

Reviewed By: fkgozali

Differential Revision: D25915170

fbshipit-source-id: 2b390428c1f582e55cf3ffe8e691f069bf2fd295
2021-01-14 19:14:23 -08:00
David Vacca 34351fd0b1 Refactor initialization of Fabric to avoid loading UIManagerModule
Summary:
This diff refactors the intialization of Fabric in order to avoid loading UIManagerModule as part of the creation of FabricJSIModuleProvider.
One caveat is that now we are not taking into consideration the flag mLazyViewManagersEnabled
master/xplat/js/react-native-github/ReactAndroid/src/main/java/com/facebook/react/CoreModulesPackage.java177

if (mLazyViewManagersEnabled) {
As a side effect of this diff view managers will be initialized twice if the user has fabric and paper enabled
This diff was originally backed out in D25739854 (https://github.com/facebook/react-native/commit/4984c1e525e310f15c7d89230fdb2fa8fea91f05) because it produced a couple of bugs:
https://fb.workplace.com/groups/rn.support/permalink/4917641074951135/
https://fb.workplace.com/groups/rn.support/permalink/4918163014898941/
These bugs are fixed by D25667987 (https://github.com/facebook/react-native/commit/2e631471092090e743245377742166ecae1d7e26).

This diff was reverted a couple of times because of the change in the registration of eventDispatcher. That's why I'm gating that behavior change as part of the "StaticViewConfig" QE.

changelog: [internal] internal

Reviewed By: JoshuaGross

Differential Revision: D25858934

fbshipit-source-id: a632799ccac728d4efca44ee685519713b4a7cbb
2021-01-14 17:27:50 -08:00
Dulmandakh 280f524b49 bump fresco to 2.3.0 (#30061)
Summary:
Bump Fresco to 2.3.0.

## Changelog

[Android] [Changed] - Bump Fresco to 2.3.0

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

Reviewed By: mdvacca

Differential Revision: D24074218

Pulled By: fkgozali

fbshipit-source-id: 9f42a24927e560da2ac64857ac8cd6b4f0211849
2021-01-14 15:50:59 -08:00
Joshua Gross 6fd684150f NativeAnimatedModule: make exceptions thrown into JS thread more verbose
Summary:
These methods can all throw exceptions that get caught and reported by JS. The logviews aren't currently very helpful; hopefully adding additional information will make batch debugging a little easier.

Changelog: [Internal]

Reviewed By: fkgozali

Differential Revision: D25870788

fbshipit-source-id: a1cab225b11a3d2868f098d4575e475ee4064e65
2021-01-12 12:13:30 -08:00
David Vacca 5348a98207 Migrate lookup of EventDispatcher to not depend on UIManagerModule
Summary:
This diff migrates all the lookups of EventDispatcher to not depend on UIManagerModule anymore.
This refactor is necessary because:
- Users running in Fabric / Venice should not load on the UIManagerModule class
- D25858934 will introduce a change that will break all of these callsites

In the migration I'm relying on the method UIManagerHelper.getEventDispatcherFromReactTag() that returns the correct EventDispatcher for a reactTag.

I'm planning to land this change early in the week (to catch potential errors in alpha / beta versions)

As a followup we need to deprecate and prevent developers to continue using getNativeModule(UIManagerModule.class) moving forward. That will be part of another diff

changelog: [internal] internal

Reviewed By: JoshuaGross

Differential Revision: D25858933

fbshipit-source-id: e26c99759307517b5bef483274fe0e0d71bb4c6c
2021-01-11 15:43:58 -08:00
Riley Dulin 291cc95cc9 Add a fatal error handler for Hermes
Summary:
Hermes has a way to set up a callback that is invoked when a fatal error
such as Out of Memory occurs. It is a static API that should be called at
most once, so it uses `std::call_once` to achieve that.

The fatal error handler is simple, it just uses glog to log an error message
to logcat, then aborts (using `__android_log_assert`).
The reason is typically very helpful for understanding why `hermes_fatal` was called.

Changelog:
[Android][Internal] - Print a logcat message when Hermes has a fatal error

Reviewed By: mhorowitz

Differential Revision: D25792805

fbshipit-source-id: 45de70d71e9bd8eaa880526d8835b4e32aab8fe3
2021-01-11 11:33:24 -08:00
David Vacca 5803c72982 Log SoftError when there is not EventDispatcher associated to UIManager
Summary:
This diff logs a SoftError when there is not EventDispatcher associated to UIManager

The app will crash in Debug mode, this will not affect production users
changelog: [internal]

Reviewed By: JoshuaGross

Differential Revision: D25859546

fbshipit-source-id: 8045bcd67f613ea6286f30fe6f3c66113c700b0b
2021-01-10 19:46:40 -08:00
David Vacca 4076293aa1 Fix changes of View visibilities
Summary:
The purpose of this diff is to ensure that visibility changes are handled correctly when the value of "display" for a View changes from 'flex' to 'none'.

RNTester is nesting several Views with different kind of visibilities. When the user tap on an item there's a state update that changes the visibility styles for some of these views. Fabric does not reflect the right changes of visibility on the screen.

changelog: internal

Reviewed By: shergin

Differential Revision: D25841763

fbshipit-source-id: 769b97afb72939d346a4c6f2669ff938b35596bc
2021-01-10 19:46:40 -08:00
Valentin Shergin e37e56b042 Back out "Add onFocus and onBlur to Pressable."
Summary:
I suspect it's causing T82781515.

Changelog:
[Category][Type] - Backout of "[react-native][PR] Add onFocus and onBlur to Pressable."

Reviewed By: p-sun

Differential Revision: D25864414

fbshipit-source-id: efba9136edba97d5bd2a0de15f9ddae7dfd24e51
2021-01-10 13:56:27 -08:00
Andres Suarez 0f4f917663 Apply clang-format update fixes
Reviewed By: igorsugak

Differential Revision: D25861683

fbshipit-source-id: 616afca13ae64c76421053ce49286035e0687e36
2021-01-09 22:11:00 -08:00
Joshua Gross 055d029bc0 Android implementation of sendAccessibilityEvent
Summary:
This is the Android native implementation of sendAccessibilityEvent for Fabric.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D25852418

fbshipit-source-id: cb51e667a7f673da6b9c9e539770225b02bdc902
2021-01-08 18:10:59 -08:00
Igor Klemenski cab4da7288 Add onFocus and onBlur to Pressable. (#30405)
Summary:
Starting to upstream keyboard-related features from React Native Windows - this is the Android implementation.
Exposing onFocus and onBlur callbacks on Pressable; they're already declared for View in ViewPropTypes.js, which Pressable wraps.

Registering event listeners in ReactViewManager to listen for native focus events.
## 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] [Added] - Add onFocus/onBlur for Pressable on Android.

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

Test Plan:
Tested on v63-stable, since building master on Windows is now broken. Screenshots from RNTester running on the emulator:
![image](https://user-images.githubusercontent.com/12816515/99320373-59777e80-2820-11eb-91a8-704fff4aa13d.png)
![image](https://user-images.githubusercontent.com/12816515/99320412-6f853f00-2820-11eb-98f2-f9cd29e8aa0d.png)

Reviewed By: mdvacca

Differential Revision: D25444566

Pulled By: appden

fbshipit-source-id: ce0efd3e3b199a508df0ba1ce484b4de17471432
2021-01-08 13:59:48 -08:00
Lukas Müller 6bfd89d277 Update OkHttp to 3.14.9 to improve security (#30609)
Summary:
Okhttp 3.12.X allows Connections using TLS 1.0 and TLS1.1.
TLS 1.0 and TLS 1.1 are no longer secure.
Google, Mozilla, Microsoft, and Apple announced that their browsers will require TLSv1.2 or better starting in early 2020.

https://square.github.io/okhttp/changelog_3x/#version-310
https://github.com/facebook/react-native/wiki/Changelog

Starting from 3.13.0 TLSv1 and TLSv1.1 are no longer enabled by default.
3.13.0 requires JAVA 8 and Android SDK 21 (which was blocking the Upgrade in the Past).

## Changelog

[Android] [Changed] - Update Okhttp to version 3.14.19

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

Test Plan:
Current tests should pass.
Connections using TLS 1.0 and TLS 1.1 should not be possible.

Reviewed By: mdvacca

Differential Revision: D25843511

Pulled By: fkgozali

fbshipit-source-id: f0b648c8037f945130c6f9983404ee7f75b178cb
2021-01-07 20:30:26 -08:00
David Vacca 2027d6236a Revert D25746024: Refactor initialization of Fabric to avoid loading UIManagerModule
Differential Revision:
D25746024 (https://github.com/facebook/react-native/commit/d3a3ce857ef5a54e7014e06af194b596ec18a03e)

Original commit changeset: 3d12d29973a1

fbshipit-source-id: 67a7f045e5c6b1bc0201ad58b569fc870c3a89f9
2021-01-06 21:37:24 -08:00
David Vacca d3a3ce857e Refactor initialization of Fabric to avoid loading UIManagerModule
Summary:
This diff refactors the intialization of Fabric in order to avoid loading UIManagerModule as part of the creation of FabricJSIModuleProvider.

One caveat is that now we are not taking into consideration the flag mLazyViewManagersEnabled
```
master/xplat/js/react-native-github/ReactAndroid/src/main/java/com/facebook/react/CoreModulesPackage.java177

if (mLazyViewManagersEnabled) {
```
As a side effect of this diff view managers will be initialized twice if the user has fabric and paper enabled

This diff was originally backed out in D25739854 (https://github.com/facebook/react-native/commit/4984c1e525e310f15c7d89230fdb2fa8fea91f05) because it produced a couple of bugs:
- https://fb.workplace.com/groups/rn.support/permalink/4917641074951135/
- https://fb.workplace.com/groups/rn.support/permalink/4918163014898941/

These bugs are fixed by D25667987 (https://github.com/facebook/react-native/commit/2e631471092090e743245377742166ecae1d7e26).

changelog: [internal] internal

Reviewed By: JoshuaGross

Differential Revision: D25746024

fbshipit-source-id: 3d12d29973a12b1edfea75f4dd954790f835e9bd
2021-01-06 00:49:50 -08:00
David Vacca 2e63147109 Refactor creation of views in Fabric Android
Summary:
This diff refactors the createViewInstance method in order to ensure that viewID is set before props are updated in the view.
This is necessary because there are components that deliver events at the same time their props are set. This means that some components might not have their viewId set correctly when events are delivered.
Since viewId is used to determine if a view belongs to Fabric or Paper, there are cases when the events are not delivered to the right renderer

changelog: [internal]

Reviewed By: JoshuaGross

Differential Revision: D25667987

fbshipit-source-id: 4acfa8f80d66e9e59514354481957d7d3b571248
2021-01-05 23:28:28 -08:00
Jayme Deffenbaugh 381fb395ad Expose the testID to black-box testing frameworks on Android (#29610)
Summary:
There has been a long-standing issue where black-box testing frameworks like Appium and Xamarin UITest have not been able to access the `testID` view prop for Android (see https://github.com/facebook/react-native/issues/7135). A natural place for this to be exposed is via a view's `resource-id`. The `resource-id` is what I have used when working on UIAutomator-based tests for native Android apps and is a non-localized, development-only identifier. As mentioned in the linked ticket, you can dynamically set the resource-id using the view's AccessibilityNodeInfo. This change simply checks to see if a testID is provided for a view and then exposes it through the view's accessibility node delegate.

## 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] - Fixes https://github.com/facebook/react-native/issues/7135,  https://github.com/facebook/react-native/issues/9942, and https://github.com/facebook/react-native/issues/16137. Display the `testID` as the `resource-id` for black-box testing frameworks

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

Test Plan:
I used the `uiautomatorviewer` tool to verify that the resource-id is populated with the `testID` of a few different views of the RNTester app.
<img width="912" alt="Screen Shot 2020-08-10 at 3 38 27 PM" src="https://user-images.githubusercontent.com/875498/89838534-55044100-db20-11ea-9be2-ba507a81f6fb.png">
<img width="1096" alt="Screen Shot 2020-08-10 at 3 40 41 PM" src="https://user-images.githubusercontent.com/875498/89838542-5897c800-db20-11ea-9895-462c6fea1130.png">

Reviewed By: JoshuaGross

Differential Revision: D25799550

Pulled By: fkgozali

fbshipit-source-id: e64ff1b90fb66b427fce7af533aa94792cfbcad3
2021-01-05 23:22:57 -08:00
David Vacca 08eacf8acd Ship optimization of ReadableNativeMaps
Summary:
Ship optimization of ReadableNativeMaps - see D25361169 (https://github.com/facebook/react-native/commit/503a6f4463f5d2f7576b33158c18d8d8e99f3291)

QE showed neutral metrics

changelog: [internal]

Reviewed By: JoshuaGross

Differential Revision: D25776019

fbshipit-source-id: 7fd32087bf2ca81236fe0aebe082be01330de2fa
2021-01-05 11:49:44 -08:00
Joshua Gross 0db56f1888 Ship IntBufferBatchMountItem experiment
Summary:
This experiment has been successfully running for several weeks and show small but statsig perf improvements. Delete the old code and ship this 100% in code to simplify Fabric code.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D25775668

fbshipit-source-id: d2b41dfe691775e52b1e89c2fb6790a6500e560e
2021-01-05 10:44:44 -08:00
Joshua Gross a2164f429a Ship lockfree mountitems
Summary:
Ship lockfree mountitems experiment.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D25775521

fbshipit-source-id: 15811b15a9dc7d463a6d46d7fefd0d433ba86280
2021-01-05 10:44:44 -08:00
David Vacca b9ad5a706d Micro-optimization in ReadableNativeMaps
Summary:
This is just a micro-optimization in ReadableNativeMaps. It wont change much in perf..

changelog: [internal]

Reviewed By: JoshuaGross

Differential Revision: D25733948

fbshipit-source-id: b01109acdf5b2eb532801469ef5cb845010c6ed0
2021-01-01 15:45:06 -08:00
Kacie Bawiec 4984c1e525 Back out "Refactor initialization of Fabric to avoid loading UIManagerModule"
Summary:
This diff D25468183 (https://github.com/facebook/react-native/commit/c776f09e5f8be53a7d9196d6497b4780eb051703) is causing TetraFormTextInput's onChange not to fire.

See https://fb.workplace.com/groups/rn.support/permalink/4918163014898941/

I confirmed this was the bad diff via mobile bisect.

changelog: [internal] internal

Reviewed By: rickhanlonii, mdvacca, nadiia

Differential Revision: D25739854

fbshipit-source-id: efdfb1e464dd5d990d5c9ea291dde9895736817a
2020-12-30 19:34:22 -08:00
Joshua Gross ee5a27b759 Remove temporary Litho-interop feature flag
Summary:
Remove temporary Litho-interop feature flag.

Changelog: [Internal]

Differential Revision: D25445364

fbshipit-source-id: c0fa3e6e5e55c0997e4a5ddd6c1cc5695878c7d2
2020-12-29 15:54:45 -08:00
Joshua Gross 249b341a41 Don't redraw images when props don't change
Summary:
Right now we assume in the Image component that any prop changes requires a redraw of the image, even if the props set are identical.

Noop prop updates can be caused in Fabric by LayoutAnimations. This may go away in the future, but only when we have a new animations system.

I don't think most other components need to be concerned with this, and many other components already guard against unnecessary redraws. Since the image "flashes"
when it is loaded, unlike most other native components, this issue is more noticeable for images.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D25727482

fbshipit-source-id: 75ffa456bddc1208900733140ce4ff19f7e2c11e
2020-12-29 15:54:44 -08:00
David Vacca b3defc8872 Refactor preComputeConstantsForViewManager to avoid loading UIManagerModule in Fabric
Summary:
This method refactors the preComputeConstantsForViewManager to avoid loading UIManagerModule when using  Fabric + Static View configs

changelog: [internal] internal

Reviewed By: shergin

Differential Revision: D25468182

fbshipit-source-id: e95b0e7d013e832792fb77fc0b6e5705d7f04868
2020-12-29 15:09:05 -08:00
David Vacca c776f09e5f Refactor initialization of Fabric to avoid loading UIManagerModule
Summary:
This diff refactors the intialization of Fabric in order to avoid loading UIManagerModule as part of the creation of FabricJSIModuleProvider.

One caveat is that now we are not taking into consideration the flag mLazyViewManagersEnabled

https://www.internalfb.com/intern/diffusion/FBS/browsefile/master/xplat/js/react-native-github/ReactAndroid/src/main/java/com/facebook/react/CoreModulesPackage.java?commit=4fb6c5ae79bb8e78e852a811128f03cf6fbed9aa&lines=177

As a side effect of this diff view managers will be initialized twice if the user has fabric and paper enabled

changelog: [internal] internal

Reviewed By: shergin

Differential Revision: D25468183

fbshipit-source-id: 78d8069007c5a98f9a6825eaa0c174603c8b9b4f
2020-12-29 10:42:18 -08:00
David Vacca 72ddd69222 Remove deleted parameter from javadoc
Summary:
ez javadoc

changelog: [internal]

Reviewed By: fkgozali

Differential Revision: D25468185

fbshipit-source-id: bba614df552b3c8431e77aaa51a29e08fae5ea7f
2020-12-29 01:00:11 -08:00
Ramanpreet Nara fb34fba01c Use native_module_spec_name to name codegen targets
Summary:
## Description
Suppose this was the codegen declaration before:

```
rn_library(
  name = "FooModule",
  native_module_spec_name = "FBReactNativeSpec",
  codegen_modules = True,
  # ...
)
```

Previously, this would generate the following BUCK targets:
- generated_objcpp_modules-FooModuleApple
- generated_java_modules-FooModuleAndroid
- generated_java_modules-FooModule-jniAndroid

## Changes
We will now generate:
- FBReactNativeSpecApple
- FBReactNativeSpecAndroid
- FBReactNativeSpec-jniAndroid

This matches the naming scheme of the old codegen.

Changelog: [Internal]

Reviewed By: fkgozali

Differential Revision: D25680224

fbshipit-source-id: 617ac18fd915f3277f6bd98072d147f20fb193e5
2020-12-24 00:50:01 -08:00
Valentin Shergin f379b1e583 Fabric: Shipping updateStateWithAutorepeat as the only way to update a state
Summary:
This replaces the internal core implementation of `setState` with the new `updateStateWithAutorepeat` which is now the only option.
In short, `updateStateWithAutorepeat` works as `setState` with the following features:
* The state update might be performed several times until it succeeds.
* The callback is being called on every retry with actual previous data provided (can be different on every call).
* In case of a static value is provided (simple case, not lambda, the only case on Android for now), the same *new*/provided value will be used for all state updates. In this case, the state update cannot fail.
* If a callback is provided, the update operation can be canceled via returning `nullptr` from the callback.

This diff removes all mentions of the previous state update approach from the core; some other leftovers will be removed separatly.

Changelog: [Internal] Fabric-specific internal change.

Reviewed By: sammy-SC

Differential Revision: D25695600

fbshipit-source-id: 14b3d4bad7ee69e024a9b0b9fc018f7d58bf060c
2020-12-23 21:49:44 -08:00
Kevin Gozali 86ffbd0a27 RNTester Android: always compile Fabric files
Summary:
This commit makes both `:ReactAndroid` and `:rn-tester:android:app` always compile in Fabric codegen outputs. However, one may still enable/disable Fabric at runtime by setting `USE_FABRIC` env var (set to 1 or 0, default is 0).

Note that we can't register custom components specific to the app, yet, so only the components in react-native github repo is covered by this commit.

RNTester doesn't enable Fabric by default yet due to known UI bugs that haven't been addressed yet.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D25674311

fbshipit-source-id: 8db660c959319250ebc683c84076677cf6489e94
2020-12-21 22:43:36 -08:00
Kevin Gozali 8db181abfc RNTester Android: generate Fabric JNI files during build time
Summary:
Generate Fabric C++ files along side TM spec files for RNTester. The combined .so then has both TM and Fabric files.

This commit also removed the checked-in JNI files.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D25674313

fbshipit-source-id: 8091d5a00f42849a74cab50e8d24f4010d500e5b
2020-12-21 22:43:35 -08:00
Kevin Gozali 15a3a01082 Android: use Fabric component codegen output instead of checked in files
Summary:
For core components, we can start using the codegen output during build time instead of the checked in files in: https://github.com/facebook/react-native/tree/master/ReactAndroid/src/main/java/com/facebook/react/viewmanagers

Note: Some files seemed to be handwritten, so this only removed those that use codegen.

Changelog: [Internal]

Reviewed By: JoshuaGross

Differential Revision: D25453157

fbshipit-source-id: f7eabddfd3fd668bef0c4aef3fddcb38c8b046a0
2020-12-21 22:43:35 -08:00
David Vacca f7c209cd54 Fix racecondition in registration of event listeners
Summary:
This diff fixes a racecondition in registration of event listeners.

mPostEventDispatchListeners is accessed from different threads, most of the times this variable is used to executed the listeners. It is only written during initialization and turn down of the renderer.

changelog: [internal]

Reviewed By: PeteTheHeat

Differential Revision: D25667988

fbshipit-source-id: 1bf95f5193d55a737bad9403206cc3320185b8cb
2020-12-21 15:08:18 -08:00
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
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