Commit Graph

3773 Commits

Author SHA1 Message Date
Emily Janzer e7f6210d5d Don't attempt to connect to React devtools every 2s
Summary:
When testing out the NetworkOverlay, I noticed that we were creating a lot of WebSocket connections for localhost:8097. Rick found that this is because we're trying to connect to React devtools every 2 seconds: https://github.com/facebook/react/blob/master/packages/react-devtools-core/src/backend.js#L67 and it appears we create a new WebSocket every time.

Dan suggested that we use opening the dev menu as a trigger for attempting to connect to React devtools. This diff uses RCTNativeAppEventEmitter to emit an event from native when the dev menu/dialog is shown, and listening to that event in JS to attempt to connect to devtools.

I'm also making the change of passing in a websocket instead of just passing in the host + port; this way it will only attempt to connect once on each call to `connectToDevTools` (otherwise, we would attempt to reconnect every 2 seconds as soon as the dev menu is opened, and then the next time the menu is opened we'd so start that *again*, and so on - I could have it keep track of whether it's already connecting and avoid doing it again, but this is easier and should be sufficient, I think).

We should probably also update the suggested troubleshooting tips on the devtools page to reflect this change, so that people don't get confused.

Changelog: [General] [Fixed] Fix issue where we attempt to connect to React devtools every 2 seconds

Reviewed By: mmmulani

Differential Revision: D17919808

fbshipit-source-id: 4658d995c274574d22f2f54ea06d7f29ef2f54dc
2019-10-23 10:30:43 -07:00
Sidharth Guglani c7ed3981ee Remove setStyleInputs API
Summary:
setStyleInputs batching API was added to reduce the number of jni calls and although it improved performance in yoga world but was not impactful in litho and is not used anywhere.

Removing this saves around 500 bytes per architecture

#Changelog:
[Internal][Yoga] Removed unused code setStyleInputs batching API form Yoga

Reviewed By: amir-shalem

Differential Revision: D18036536

fbshipit-source-id: 7436b55dcd464dd9f9cc46406d4fd78d12babe55
2019-10-23 02:37:14 -07:00
Emily Janzer c10c147bcc Fix a parameter type in NativeNetworkingAndroidSpec
Summary:
`responseType` should be a string, not an Object (which gets converted to a NativeMap by TM).

Changelog: [General] [Fixed] Fix the flow type for NativeNetworkingModule

Reviewed By: fkgozali

Differential Revision: D18019418

fbshipit-source-id: 316470ca82241223eafb5b05a54fc2bbf3074821
2019-10-22 19:34:40 -07:00
Emily Janzer e040a198e2 Update OSS specs
Summary:
Updating the generated base classes for OSS modules.

Changelog: [Internal]

Reviewed By: RSNara

Differential Revision: D18068889

fbshipit-source-id: 60c709d00d8237c422da163b5348e5e8e7d5c46f
2019-10-22 19:34:40 -07:00
Emily Janzer 6b3d4e41ee Convert WebSocket module to TurboModule
Summary:
Implement the TurboModule interface in WebSocketModule.

Changelog: [Internal]

Reviewed By: mdvacca, RSNara

Differential Revision: D17587622

fbshipit-source-id: 6135ad79955c014a648cd29e21e91c71bbee5d44
2019-10-22 19:34:39 -07:00
David Vacca d9f7f99d91 Report error if font size value is zero or negative
Summary:
Text font size should not be negative, this diff throws an exception if TextView uses negative of zero font size

Changelog: [[internal]]

Reviewed By: shergin

Differential Revision: D18068071

fbshipit-source-id: 4074dca2019b6223eef68a407570258adbceaa43
2019-10-22 18:07:00 -07:00
David Vacca 229fa32ab6 Fix TextAlign prop in Fabric
Summary:
Text didn't support horizontal textAlign in Fabric for Android, this diff fixes that

Changelog: Add support for TextAlign prop in Fabric

Reviewed By: makovkastar

Differential Revision: D18068072

fbshipit-source-id: 3f8b1ba46989b55197fe9aa60ba2fb055b003d67
2019-10-22 14:30:23 -07:00
Joe Loser ba18ee9b87 Replace folly::make_unique with std::make_unique (#26730)
Summary:
There is a mixed usage of `folly::make_unique` and `std::make_unique`. Soon, `folly::make_unique` may be removed (see [this PR](https://github.com/facebook/folly/pull/1150)). Since `react-native` only supports C++14-compilers and later, switch to always using `std::make_unique`.

## Changelog

[Internal] [Removed] - Replace folly::make_unique with std::make_unique
Pull Request resolved: https://github.com/facebook/react-native/pull/26730

Test Plan:
Running the existing test suite. No change in behavior is expected.

Joshua Gross: buck install -r fb4a, make sure MP Home and forced teardown works okay on android

Reviewed By: shergin

Differential Revision: D18062400

Pulled By: JoshuaGross

fbshipit-source-id: 978ca794c7e972db872a8dcc57c31bdec7451481
2019-10-22 12:21:41 -07:00
Moti Zilberman 468d1a2d2e Render collapsed frames in RedBox
Summary:
Renders frames in RedBox in a greyed-out style when their `collapse` field is set to `true`. This avoids outright hiding information in the stack trace while still drawing attention to frames that are likely to be more meaningful.

Changelog: [General] [Changed] - Render collapsed JavaScript frames in RedBox

Reviewed By: rickhanlonii

Differential Revision: D18039438

fbshipit-source-id: 527588f11c0bff495842be7036cd1293bab65eb9
2019-10-22 11:05:36 -07:00
Sidharth Guglani 25e4265fc7 Add exception handling in vanilla jni
Summary:
Exception handling in vanilla jni

## Changelog:
[Internal] [Added] Added exception handling for vanilla jni implementation in yoga

Reviewed By: amir-shalem

Differential Revision: D18036134

fbshipit-source-id: 965eaa2fddbc00b9ac0120b79678608e280d03db
2019-10-22 10:47:26 -07:00
David Vacca 7935174d48 Fix negative letterspacing in Fabric android
Summary:
This diff adds support for negative letterspacing values in Fabric android
Changelog: add support fot negative letterspacing values in Fabric android

Reviewed By: JoshuaGross

Differential Revision: D18054648

fbshipit-source-id: de1b906e6b8c0b021ffdc2e4bdad243075230667
2019-10-22 10:20:04 -07:00
Joshua Gross 2ea33044bd Use getReactApplicationContextIfActiveOrWarn in modules that access JS or Native modules through ReactApplicationContext
Summary:
In D18032458 we introduce `getReactApplicationContextIfActiveOrWarn`. In this diff, modules that access a JS or Native module through ReactApplicationContext need to check if the CatalystInstance is still alive before continuing.

Changelog: [Internal]

Reviewed By: furdei

Differential Revision: D18032788

fbshipit-source-id: 5152783afd0b93b8ce0970fe4a509ea71396a54a
2019-10-21 15:59:21 -07:00
Joshua Gross b12a29cfcb Implement getReactApplicationContextIfActiveOrWarn in ReactContextBaseJavaModule to generalize checking hasActiveCatalystInstance and warning when it's dead
Summary:
In three previous diffs (D18020359 D17998627 D17969056), I implemented this logic in three different modules. There are potentially hundreds of modules where we should be implementing this check, so I'm moving the important logic into ReactContextBaseJavaModule.

Additionally, `WebSocketModule` was retaining its own copy of ReactApplicationContext instead of using the built-in `getReactApplicationContext`, so I removed that ivar from `WebSocketModule`.

Changelog:
[Internal]

Reviewed By: mdvacca

Differential Revision: D18032458

fbshipit-source-id: 9114120d3b80334df8d2e0813e36d21c667fc1bd
2019-10-21 15:59:21 -07:00
David Vacca e21ed675ec Refactor FabricSoLoader to ensure sDidInit is accessed correctly
Summary:
sDidInit can be accessed from different threads, this diff refactors the definition of this variable to be volatile and also to be assigned at the end of the staticInit() method.

Changelog:
Ensure proper initialization of FabricSoLoder

Reviewed By: ejanzer

Differential Revision: D18010919

fbshipit-source-id: 3ec7b19fdc15056b90fc01281b8c3888e93a7dd3
2019-10-21 14:42:45 -07:00
Joshua Gross cd12f256e9 Change tearDownReactContext ordering to prevent null assertion
Summary:
In `tearDownReactContext`, `reactContext.destroy()` sets `mCatalystInstance` to null. We cannot call `reactContext.getCatalystInstance()` after that without hitting an assertion. Change ordering so that doesn't happen in reload or teardown.

Changelog: [Internal]

Reviewed By: makovkastar

Differential Revision: D18041279

fbshipit-source-id: 22658dc506b76cf58aee1008841abacfe9410c9d
2019-10-21 11:47:39 -07:00
David Vacca 585dfff22b Disable preallocation of views in Mounting layer of fabric
Summary:
This diff adds an experiment to disable the preallocation of views on the mounting layer of Fabric

Changelog:
Add a ReactNativeConfig to configure the preallocation of views in the mounting layer of Fabric

Reviewed By: shergin

Differential Revision: D17949681

fbshipit-source-id: 0af63df22aff9e94289bc8a8217c79222f1fd61c
2019-10-21 11:47:39 -07:00
Joshua Gross 1e9d4cde4b Wait until everything is destroyed before returning from CatalystInstanceImpl.destroy
Summary:
CatalystInstanceImpl.destroy does a bunch of stuff in each of the relevant threads (Native Module thread, JS thread, UI thread).

This change creates a V1 destroy method (unchanged) and a V2 destroy method. The goal is to resolve (and catch!) race conditions in native modules and JSI modules that could occur during teardown; and mitigate race conditions that occur in RN teardown, like deallocation of C++ objects (scheduler, JS VM, and UIManager for Fabric).

Changelog:
[Internal] Experiment to fix deallocation race conditions

Reviewed By: mdvacca

Differential Revision: D18001677

fbshipit-source-id: 5955da0a7b726491c7d749642475f0fba74cce5a
2019-10-19 02:30:09 -07:00
Joshua Gross 9ddc038e54 WebSocketModule should verify that Catalyst is alive before getting a JS module
Summary:
WebSocketModule can be called asynchronously while the ReactContext/CatalystInstance is being torn down. Trying to get a JS module at this time will result in a crash if the ReactContext has already torn down Catalyst. Check explicitly that Catalyst is still alive before trying to emit an event to JS via some JS module.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D18020359

fbshipit-source-id: 1b77abd457c7d97bd241389251890bb682b6fde3
2019-10-19 02:30:09 -07:00
Joshua Gross 46a28e5460 AppStateModule should verify that Catalyst is alive before getting a JS module
Summary:
AppStateModule can be called indirectly when the ReactContext is torn down. Trying to get a JS module at this time will result in a crash if the ReactContext has already torn down Catalyst. Check explicitly that Catalyst is still alive before trying to emit an event to JS via some JS module.

Changelog: [Internal]

Reviewed By: ejanzer, mdvacca

Differential Revision: D17969056

fbshipit-source-id: dd446de57280e588a73f3e228bac82b3d67ecdc0
2019-10-19 02:30:09 -07:00
Joshua Gross f8bf65b8fd Make sure FabricUIManager doesn't double-free Binding, or double-destroy itself
Summary:
While unlikely, in exceptional cases it's possible that `onCatalystInstanceDestroy` is called multiple times, especially since there's no restrictions as to which thread this is called on (currently it's only called on the JS thread from CatalystInstanceImpl) and no synchronization. Make sure it tears down cleanly if called multiple times, and report soft exceptions if that's detected.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D18001678

fbshipit-source-id: 4a7c37b5b3c2207ba1dd9c7d85690391f799518d
2019-10-19 02:30:08 -07:00
Joshua Gross 95a43f3366 Set mCatalystInstance to null when destroying ReactContext
Summary:
We want ReactContext to blow up if it tries to use `mCatalystInstance` after `destroy` is called.

Changelog:
[[Internal]]

Reviewed By: mdvacca

Differential Revision: D17944723

fbshipit-source-id: cfe8a8b98473f53dd68bbcd91a71f58bd7a0c503
2019-10-19 02:30:08 -07:00
Ramanpreet Nara d3ac9fa0c3 Check in OSS NativeModule specs
Summary:
This diff checks in the output from `fbsource//xplat/js:FBReactNativeSpec-flow-type-android-files` into `react-native-github/ReactAndroid/src/main/java/com/facebook/fbreact/specs/`.

To update the codegen output, please run:
```
js1 build oss-native-modules-specs -p android
```

To use the codegen, add the following as a buck dep to your target:
```
fbsource//xplat/js/react-native-github/ReactAndroid/src/main/java/com/facebook/fbreact/specs:FBReactNativeSpecAndroid
```

Changelog: [Android][Added] Check in TurboModules codegen

Reviewed By: fkgozali

Differential Revision: D17990380

fbshipit-source-id: 94895e375311e9360c308dffadf1558a5ff04212
2019-10-18 16:24:09 -07:00
Joshua Gross 526a010ad7 Add ThreadConfined(UI) to CatalystInstanceImpl.destroy
Summary:
This already has an assert that `destroy` should only be called on the UI thread. Add an annotation.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D17989113

fbshipit-source-id: fd44f321cbcb7f0a18383ca6226cce72e5991eea
2019-10-18 15:08:53 -07:00
David Vacca 3408dc0b3e Customize ExceptionHandler in ReactAppTestActivity
Summary:
This diff extends the ReactAppTestActivity to allow customization of the RN ExceptionHandler

Changelog:
This diff extends the ReactAppTestActivity to allow customization of the RN ExceptionHandler

Reviewed By: JoshuaGross

Differential Revision: D17993132

fbshipit-source-id: 7320d35a4d88d56a7356f2863829c88758c08341
2019-10-18 09:09:30 -07:00
Dulmandakh acd4a3b1d4 fix Android CI (#26862)
Summary:
This PR fixes Android CI.

## Changelog

[Android] [Fixed] - fix Android CI
Pull Request resolved: https://github.com/facebook/react-native/pull/26862

Test Plan: Android CI is green again

Differential Revision: D17925576

Pulled By: mdvacca

fbshipit-source-id: 90bdccda96a11210254a9eaab3c373151057f332
2019-10-17 01:07:53 -07:00
Andres Suarez aee88b6843 Tidy up license headers [3/n]
Summary: Changelog: [General] [Fixed] - License header cleanup

Reviewed By: yungsters

Differential Revision: D17952693

fbshipit-source-id: 8fcb8e58a2e04e7a3169f4d525bffc00835768e6
2019-10-16 10:06:34 -07:00
Andres Suarez 3b31e69e28 Tidy up license headers [2/n]
Summary: Changelog: [General] [Fixed] - License header cleanup

Reviewed By: yungsters

Differential Revision: D17952694

fbshipit-source-id: 17c87de7ebb271fa2ac8d00af72a4d1addef8bd0
2019-10-16 10:06:34 -07:00
Andres Suarez 722feeb02b Tidy up license headers [1/n]
Summary: Changelog: [General] [Fixed] - License header cleanup

Reviewed By: yungsters

Differential Revision: D17952695

fbshipit-source-id: 81aa607612ba1357ef7814ef20371335151afe7e
2019-10-16 10:06:33 -07:00
Joshua Gross a440613654 Add ThreadConfined(UI) annotations to relevant methods in ReactContext
Summary:
Add ThreadConfined(UI) annotations to relevant methods in ReactContext.

Changelog:
[[Internal]]

Reviewed By: mdvacca

Differential Revision: D17944686

fbshipit-source-id: ce93c6ffa2a523532cbe709650054638412da59e
2019-10-16 00:19:34 -07:00
Joshua Gross 71d2c07c6e Unconditionally log when destroying FabricUIManager
Summary:
Unconditionally log when destroying FabricUIManager.

Changelog:
[[Internal]]

Reviewed By: mmmulani

Differential Revision: D17944621

fbshipit-source-id: 89f97ff966ae5b071eb0b50d888b41b264d9dab9
2019-10-16 00:19:34 -07:00
Andres Suarez e1cfeaddd4 Move non-license comments out of license header
Summary: Changelog: [General] [Fixed] - License header cleanup

Reviewed By: cpojer

Differential Revision: D17749100

fbshipit-source-id: edca9c73a065e9fc311109cd6efeb1f75451a55a
2019-10-15 20:12:12 -07:00
David Vacca c65267ca6f Allow update of state to receive null objects
Summary:
This diff changes updateState method to support null stateWrappers, before this method would crash with a NullPointerException, now it allows the null object to reach the view manager.

Changelog: Add support for update of nullable localState in Fabric

Reviewed By: JoshuaGross

Differential Revision: D17939651

fbshipit-source-id: c62555905e39f9e0db75b9e1d1b93f33d0560266
2019-10-15 18:52:26 -07:00
Andres Suarez b7c14f29cf Tidy up license headers
Summary: Changelog: Tidy up license headers

Reviewed By: SidharthGuglani

Differential Revision: D17919414

fbshipit-source-id: 0501b495dc0a42256ca6ba3284a873da1ab175c0
2019-10-15 10:32:14 -07:00
James Ide df653a9dc2 More robust hermes-engine lookup logic in makefiles (#26820)
Summary:
The Android makefiles had hard-coded paths to hermes-engine, sometimes looking in `node_modules` and other times looking in `..`. This commit implements the Node module resolution algorithm (see common.mk), which handles both of these cases and also looks further up the root if necessary, handling the case when the `hermes-engine` npm package is hoisted.

This commit does three things:

- Defines `find-node-module` and uses it in the makefiles to find `hermes-engine`
- Removes the unused `/path/to/hermes-engine/include` paths since this directory does not exist and should be `/path/to/hermes-engine/android/include` (`android`)
- Moves the definition of `REACT_NATIVE` in the makefiles to the top. It was defined after every `$(CLEAR_VARS)` invocation but was not actually cleared anyway. `$(CLEAR_VARS)` resets only `LOCAL_*` variables in this list: https://android.googlesource.com/platform/build/+/7dc45a8/core/clear_vars.mk

## Changelog

[Internal] [Changed] - Android Makefiles look for hermes-engine using Node's module resolution algorithm
Pull Request resolved: https://github.com/facebook/react-native/pull/26820

Test Plan: Run `./gradlew :ReactAndroid:installArchives`, which requires the hermes-engine paths to be correct in order to find the headers.

Differential Revision: D17923671

Pulled By: cpojer

fbshipit-source-id: 9238b8718a94080db1abbba6375a6a1d484c871d
2019-10-14 19:21:43 -07:00
Sharon Gong baa66f63d8 Announce accessibility state changes happening in the background (#26624)
Summary:
Currently the react native framework doesn't handle the accessibility state changes of the focused item that happen not upon double tapping. Screen reader doesn't get notified when the state of the focused item changes in the background.
To fix this problem, post a layout change notification for every state changes on iOS.
On Android, send a click event whenever state "checked", "selected" or "disabled" changes. In the case that such states changes upon user's clicking, the duplicated click event will be skipped by Talkback.

## Changelog:
[General][Fixed] - Announce accessibility state changes happening in the background
Pull Request resolved: https://github.com/facebook/react-native/pull/26624

Test Plan: Add a nested checkbox example which state changes after a delay in the AccessibilityExample.

Differential Revision: D17903205

Pulled By: cpojer

fbshipit-source-id: 9245ee0b79936cf11b408b52d45c59ba3415b9f9
2019-10-14 00:28:34 -07:00
James Ide fc25f288fe Use Node's module resolution algo to find JSC & Hermes (#26773)
Summary:
The Gradle build file looks up jsc-android and hermes-engine using hard-coded paths. Rather than assuming the location of these packages, which are distributed and installed as npm packages, this commit makes the Gradle file use Node's standard module resolution algorithm. It looks up the file hierarchy until it finds a matching npm package or reaches the root directory.

## Changelog:

[Android] [Changed] - ReactAndroid's Gradle file uses Node's module resolution algorithm to find JSC & Hermes
Pull Request resolved: https://github.com/facebook/react-native/pull/26773

Test Plan: Ensure that CI tests pass, and that `./gradlew :ReactAndroid:installArchives` works. Printed out the paths that the Gradle script found for jsc-android and hermes-engine (both were `<my stuff>/react-native/node_modules/jsc-android|hermes-engine`).

Differential Revision: D17903179

Pulled By: cpojer

fbshipit-source-id: 9ac3ba509974f39f87b511d5bc3398451c12393f
2019-10-13 23:26:39 -07:00
Joshua Gross fa1c2be387 Slightly more aggressive FabricUIManager teardown
Summary: Tear down FabricUIManager more aggressively. The rest of the ivars here we can't set to null (yet) because they're marked as final.

Reviewed By: mdvacca

Differential Revision: D17878342

fbshipit-source-id: a1c8ace2603750ac39c3d97e1aca6c486ba5fb79
2019-10-11 11:41:37 -07:00
Sidharth Guglani 93df73975e useVanilla flag for measure and baseline methods as well
Summary: UseVanillaJNI flag was missing for measure and baseline functions

Reviewed By: amir-shalem

Differential Revision: D17868201

fbshipit-source-id: 95d6843d643e90157a51550d6efbf059f0ca2c39
2019-10-11 02:04:06 -07:00
Pavol Fulop c35a419e5d Make android modal to appear underneath translucent StatusBar (#26706)
Summary:
As described in https://github.com/facebook/react-native/issues/26559 , the modal is not appearing underneath translucent StatusBar so you can see previous view underneath the StatusBar instead. As a solution you can now provide prop to set the modal to have translucent StatusBar and therefore the content will appear underneath. I tried to reuse layout flags that are possibly set if you use StatusBar component but sadly values in them do not reflect the props set by StatusBar component.

## Changelog

[Android] [added] - Added statusBarTranslucent prop to Modal component, to indicate if StatusBar should appear translucent.
Pull Request resolved: https://github.com/facebook/react-native/pull/26706

Test Plan:
### With StatusBar translucent

![image](https://user-images.githubusercontent.com/3984319/66131336-8bfdf200-e5f3-11e9-940e-c6bb3f67ea6f.png)

``` <Modal statusBarTranslucent>```
### Without

![image](https://user-images.githubusercontent.com/3984319/66131403-a768fd00-e5f3-11e9-9814-ff7592b4ceac.png)

``` <Modal>```

Differential Revision: D17872874

Pulled By: mdvacca

fbshipit-source-id: 8c4b48a75cddf86c4429b62d0c63313e7a2dd1b8
2019-10-10 22:14:23 -07:00
Joshua Gross 7c20dc65d9 Add asserts and annotations for FabricUIManager UI-thread methods
Summary: These methods are (or should be) only called on the UI thread. Make those assumptions explicit.

Reviewed By: mdvacca

Differential Revision: D17865205

fbshipit-source-id: 9b3acf8f3215a07b1a667ced55e50e99a488de79
2019-10-10 22:01:10 -07:00
Joshua Gross 299eb9f440 Explicitly set mBinding to null in FabricUIManager
Summary: Although `mBinding` is unregistered which means the connection to the JNI-bridged Cxx object can be destructed, we still hold onto the `mBinding` Java object after unregistering. That doesn't seem desirable, I think we should just clear it out here for consistency.

Reviewed By: mdvacca

Differential Revision: D17865206

fbshipit-source-id: 1ad8643c48ba0b2d52620a7b8ebe8a52928648ef
2019-10-10 20:36:56 -07:00
Joshua Gross c82e27030c Add UI thread assertions and annotations to ReactRootView
Summary:
Add UI thread assertions and annotations to ReactRootView. Shouldn't have any immediate effect since these methods already call other methods that assert they're on the UI thread. Doing this to hoist assumptions higher up.

Doing some very simple refactoring to the way cleanup happens to ensure aggressive cleanup in more instances.

Reviewed By: shergin

Differential Revision: D17860291

fbshipit-source-id: c87e0336594fa2327271b648eb8340e250235250
2019-10-10 14:38:32 -07:00
Sidharth Guglani b65870871f no need to pass env to ref method , we can directly use getCurrentEnv()
Summary: We can use getCurrentEnv() instead of passing environment variable around

Reviewed By: amir-shalem

Differential Revision: D17842042

fbshipit-source-id: 185b174ae7c08e746bc76c0600c2e326b15c4993
2019-10-10 05:33:33 -07:00
Sidharth Guglani 65a2f15423 rename PtrJNodeMap to PtrJNodeMapVanilla in yoga vanilla jni files
Summary: Rename PtrJNodeMap in vanilla files top PtrJNodeMapVanilla , otherwise they conflict

Reviewed By: amir-shalem

Differential Revision: D17842001

fbshipit-source-id: eb164076ee2a68d79dc376826508a4143056ea31
2019-10-10 05:33:33 -07:00
Sidharth Guglani 76ce30fb33 Fix YGNodeJobject method
Summary: We can use getCurrentEnv() , no need to pass env around methods

Reviewed By: amir-shalem

Differential Revision: D17841281

fbshipit-source-id: a4a58292e70ac05b0f0b9eb962a82a8501ad0226
2019-10-10 05:33:32 -07:00
Sidharth Guglani 9afc1bc2ed Move JNI_OnLoad to separate file which registers both fbjni and jni methods
Summary: Move JNI_ONLoad to a separate file so that both fbjni native methods and vanillla jni native methods can be initialized correctly

Reviewed By: amir-shalem

Differential Revision: D17840166

fbshipit-source-id: 045df0df7a95bc331cbbefb3a118a349f3029465
2019-10-10 05:33:32 -07:00
Amir Shalem 62649d31a4 Set missing useVanillaJNI in constructor for YogaNode
Summary: set missing useVanillaJNI, it was causing part of the unit-tests to run in fbjni instead of vanillajni.

Reviewed By: SidharthGuglani

Differential Revision: D17852635

fbshipit-source-id: 5bc187d90fbdc430015be55a015a7d1e0ba0ebc6
2019-10-10 02:44:37 -07:00
Ram N 15ecb60d6d Expose Hermes Sampling Profiler in default react native templates
Reviewed By: yinghuitan

Differential Revision: D8063912

fbshipit-source-id: bc894762223c552abcb9151f702476cf333c059c
2019-10-09 21:51:13 -07:00
Oleksandr Melnykov 1dc03f4858 Back out "[react-native][PR] Set rounded rectangle mask on TouchableNativeFeedback's ripples"
Summary: This PR caused a regression with shadows, see https://github.com/facebook/react-native/issues/26544.

Reviewed By: JoshuaGross, mdvacca

Differential Revision: D17809320

fbshipit-source-id: 0c83cd211425622ada0fd8c492f43df0536a4b8a
2019-10-09 10:39:04 -07:00
Sidharth Guglani 12eb44641f Use TestParametrization for testing both fbjni and vanillaJNI version
Summary: Use TestParametrization to test both fbjni and vanilla jni versions

Reviewed By: amir-shalem

Differential Revision: D17788718

fbshipit-source-id: 0f3317b7403cadca7b7ccd9140f1933d746bf433
2019-10-09 09:28:37 -07:00