Граф коммитов

18427 Коммитов

Автор SHA1 Сообщение Дата
Kacie Bawiec 85ac9cf6c7 Flow type Animated.View
Summary:
Add flow typing to `Animated.View`.

Changelog: [Internal]

Reviewed By: TheSavior

Differential Revision: D18050607

fbshipit-source-id: 454ef20715527c3c809e2fa4cfb2e1a198d6a3e0
2019-10-23 11:43:28 -07:00
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
Moti Zilberman 99d229e186 Make deepDiffer behavior with function inputs configurable, add logging
Summary: Changelog: [Internal]

Reviewed By: yungsters

Differential Revision: D17951644

fbshipit-source-id: 34bff1937a6157b049193359cb0ad346c48287a6
2019-10-23 00:58:56 -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
Luna Wei 6ba2769f0f Separate ScrollViewCommands
Summary: Changelog: [Internal] Move out ScrollView commands to prevent circular dependency

Reviewed By: TheSavior

Differential Revision: D18065033

fbshipit-source-id: fa4f69ec6fd565bc7b7f4bd085ed44e1289c5246
2019-10-22 19:03:43 -07:00
Luna Wei b6343408f9 Back out "Back out "Convert scrollresponder dipatches to native commands""
Summary:
Changelog: [Internal] Convert scrollTo, scrollToEnd, flashScrollIndicators to use native commands

This was reverted because of a circular dependency that was found in AMA. See D18065033 for fixing the circular dependency

Reviewed By: TheSavior

Differential Revision: D18063703

fbshipit-source-id: 7bd0125833f4f9e9e2f227732af0d6e38f009c06
2019-10-22 19:03:43 -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
Ramanpreet Nara 002d3c179d Retain cropData object in ImageEditingManager.cropImage
Summary:
All struct args are passed into NativeModule methods via references. If blocks access those references, we don't move those references to the heap. This means that by the time that the block accesses the struct arg, it could be freed. This can crash the program.

The solution is simple: we copy the struct arg, and access the copy in the block. This ensures that the block will make a copy, which prevents the underlying data structures from being released by the time that the block accesses the struct arg.

Changelog:
[iOS][Fixed] - Retain cropData struct arg in ImageEditingManager.cropImage call

Differential Revision: D18076026

fbshipit-source-id: 1a7bb602606ff1afac38ad5451662c82fa86f205
2019-10-22 17:16:33 -07:00
Panagiotis Vekris 94845b5783 Suppress private property accesses
Summary: Changelog: [Internal]

Reviewed By: rijn

Differential Revision: D18055795

fbshipit-source-id: c48e1b7c14dc052b9cebc48037ac745dd2890969
2019-10-22 16:55:17 -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
Eli White 7d8dfa500c Fix flowfixme in ScrollViewExample
Summary:
$title

Changelog: [Internal]

Reviewed By: JoshuaGross

Differential Revision: D17949318

fbshipit-source-id: 9daa8890d4a65678c6ebf800b1c66d4ed2f4d80f
2019-10-22 14:16:59 -07:00
Rick Hanlon cc056907cf Clean up API for LogBoxLogParser
Summary:
This diff cleans up two functions from:

```
LogBoxLogData.add({args: ['A']});
LogBoxLogParser({args: ['A']});
```

to:

```
LogBoxLogData.add(['A']);
LogBoxLogParser.parseLog(['A']);
```

Changelog: [Internal]

Reviewed By: cpojer

Differential Revision: D18056462

fbshipit-source-id: be6108069fc24b1f25d1382ad31c314183c793f8
2019-10-22 14:13:20 -07:00
Rick Hanlon 41b0d0a672 LogBox - Clean up and test message substitutions
Summary:
This diff cleans up some of the message substitution logic and adds unit tests

Changelog: [Internal]

Reviewed By: cpojer

Differential Revision: D18056241

fbshipit-source-id: 6173961c049071ab8aeff6cd273bd3590ee21e60
2019-10-22 14:13:19 -07:00
Rick Hanlon c55aa1dd8c LogBox - Change count from grouping number to total count
Summary:
Previously we were should the count for the group (similar to how Chrome show the count on logs). This makes it difficult (impossible) to know how many logs are in the console without opening up the inspector.

This diff changes it so that the count shows the total number of warnings in the console instead.

Changelog: [Internal]

Reviewed By: cpojer

Differential Revision: D18056028

fbshipit-source-id: c94a446708fb0885962e5c7dde75300cbedbab9b
2019-10-22 14:13:19 -07:00
Rick Hanlon fb8e6610e5 LogBox - remove ignored logs as perf improvement
Summary:
This diff improves LogBox performance by not storing and updating logs that are ignored.

Previous we stored all logs, including ignored, as a set. This was so that later, when we show a list of all logs, we would be able to show the ignored logs as well if toggled on. We stored the logs as:

```
const logs = new Set([
  {
    message: "Not ignored",
    ignored: false,
  },
  {
    message: "Ignored",
    ignored: true,
  },
  // 100s more ignored logs
]);
```

But it turns out, we can have hundreds of ignored logs within seconds in some parts of the app. This means we we're re-rendering the LogBoxContainer hundreds of times with a filter on this set to filter out the ignored logs, just to change none of the content.

Now we store as:

```
const logs = new Set([
  {
    message: "Not ignored",
  },
]);
```

Later, when we want to show ignored logs, we'll store these separately.

Changelog: [Internal]

Reviewed By: cpojer

Differential Revision: D18055799

fbshipit-source-id: f5e21f66bb4ab6137d5d3908e8c03e119e3805d5
2019-10-22 14:13:18 -07:00
Rick Hanlon 1801dbd333 LogBox - Better detection for component stack traces
Summary:
In YellowBox we were parsing the component stack trace in a narrow set of use cases, which are commonly missed (I see this working ~50% of the time). That seems to be overly cautious. In LogBox, since there's a nice UI for component stack traces, let's be more aggressive about finding the component stack and we can address it with feedback if we find that there are real issues with this strategy in practice

Changelog: [Internal]

Reviewed By: cpojer

Differential Revision: D18053389

fbshipit-source-id: 48f116e2bd3f8cc43d53d3668fd6d5b8d7cba2a4
2019-10-22 14:13:18 -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
Luna Wei 76ab5062e9 Use queryCache in image
Summary:
Changelog: [iOS][internal] -  Use ImageLoader's `queryCache` in image.ios.js. See D17714521 for native definition

Background:
ImageViewManager is a ViewManager. But we are loading and calling this method as if it is a NativeModule
```
const {ImageViewManager} = NativeModules.
```

This change calls the new method on the actual native module instead of the view manager. This is consistent with the existing behavior on android.

Reviewed By: zackargyle, TheSavior

Differential Revision: D17714520

fbshipit-source-id: b67a62d880978d6b94228cbff8b7e49c54dc44cc
2019-10-22 10:36:32 -07:00
Luna Wei 0167dff209 Use prefetchImage method in Image
Summary:
Changelog: - [iOS][Internal]  Use ImageLoader's `prefetchImage` in image.ios.js. See D17714519 for native definition

Background:
ImageViewManager is a ViewManager. But we are loading and calling this method as if it is a NativeModule
```
const {ImageViewManager} = NativeModules.
```

This change calls the new method on the actual native module instead of the view manager. This is consistent with the existing behavior on android.

Reviewed By: zackargyle, TheSavior

Differential Revision: D17704732

fbshipit-source-id: 510cb8f4a5609258414d3e9d98f57b50e80305c5
2019-10-22 10:36:32 -07:00
Luna Wei 92c14f1562 Use ImageLoader for getSizeWithHeaders
Summary:
Changelog: - [iOS][Internal]  Use ImageLoader's `getSizeWithHeaders` in image.ios.js. See D17693907 for native definition

Background:
ImageViewManager is a ViewManager. But we are loading and calling this method as if it is a NativeModule
```
const {ImageViewManager} = NativeModules.
```

This change calls the new method on the actual native module instead of the view manager. This is consistent with the existing behavior on android.

Reviewed By: JoshuaGross, TheSavior

Differential Revision: D17704091

fbshipit-source-id: 916ae82fd6f302532f04c1fa590eed8cdd5f63a8
2019-10-22 10:36:32 -07:00
Luna Wei 7455ae48b3 Use ImageLoader native module
Summary:
Changelog: [Internal][iOS] Use ImageLoader's `getSize` in image.ios.js. See D17607364 for native definition

Background:
ImageViewManager is a ViewManager. But we are loading and calling this method as if it is a NativeModule
```
const {ImageViewManager} = NativeModules.
```

This change calls the new method on the actual native module instead of the view manager. This is consistent with the existing behavior on android.

Reviewed By: TheSavior

Differential Revision: D17607363

fbshipit-source-id: 771e60c54d2c311dee8647ea341a530302895a85
2019-10-22 10:36:31 -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
Andres Suarez 10f55e752d Tidy up license headers
Summary: Changelog: [General] [Fixed] - License header cleanup

Differential Revision: D18060535

fbshipit-source-id: f5c07e983c54a055bf3c42662c99f288643aa27c
2019-10-22 07:46:08 -07:00
Moti Zilberman 8bc02fdd52 Remove framesToPop support from ExceptionsManager and parseErrorStack
Summary:
Removes support for the non-standard `framesToPop` error property from React Native. Redboxes will now ignore this field. The way to skip uninformative frames in stack traces going forward is to use Metro's `customizeFrame` config option, for which the React Native CLI ships useful defaults (see: https://github.com/react-native-community/cli/pull/596, https://github.com/react-native-community/cli/pull/780)

Changelog: [General] [Removed] - Remove support for framesToPop from ExceptionsManager

Reviewed By: rickhanlonii

Differential Revision: D17877444

fbshipit-source-id: 04aa332c45ad35a99ae20e05fb87b34c91a557ab
2019-10-22 04:09:49 -07:00
Sam Goldman def3ebe3fd @allow-large-files Deploy Flow v0.110.0
Summary: Changelog: [Internal]

Reviewed By: dsainati1

Differential Revision: D18054545

fbshipit-source-id: 80d88a8004cb3172e4079ff10a4c11741adf2a6f
2019-10-21 22:30:39 -07:00
Rick Hanlon fa1949dd64 Add global.__reactExperimentalLogBox
Summary:
Adds a global setting to enable LogBox `global.__reactExperimentalLogBox`

Changelog: [Internal]

Reviewed By: cpojer

Differential Revision: D17966004

fbshipit-source-id: 4d373b2ed12a1eed4e119ba9ebed1d090f8f3121
2019-10-21 21:08:03 -07:00
Rick Hanlon b08d972084 Add UI tests for LogBox
Summary:
Adds tests for `LogBox/UI`

Changelog: [Internal]

Reviewed By: cpojer

Differential Revision: D17965863

fbshipit-source-id: ffb8c669cf5b1a9fa537f725523db80d3bc4fc77
2019-10-21 21:08:03 -07:00
Rick Hanlon c2832f2355 Add data tests for LogBox
Summary:
Adds tests for `LogBox/Data`

Changelog: [Internal]

Reviewed By: cpojer

Differential Revision: D17965799

fbshipit-source-id: 708c62c1c886e65f4cc48f5fd22aaea3190f5512
2019-10-21 21:08:03 -07:00
Rick Hanlon 7d4121da02 Add LogBox for warnings
Summary:
# Overview

This diff adds the initial LogBox redesign implementing only Warnings for now. The following diffs include the tests for this, as well as a way to enable an experimental flag to opt-in.

Changelog: [Internal]

## Changes

To init LogBox, we've taken the core of YellowBox and rewritten it entirely.

Differences from Yellowbox include:
- Data model re-written
  - More performant
  - Allows a future listing of logs in order
  - Allows a future toggle to show ignored logs
  - Moves category into a property
  - Groups by the same sequential message (as chrome does) instead of by category
  - Does not store dupes of the same messages, only a count
- UI revamp
  - Color and design refresh
  - Does not spam UI with logs
  - Only shows the most recent log
  - Dismiss all button is always in one place
  - Allows navigating through all of the warnings in the list, not just ones in the same category
  - Collapses message to 5 lines (tap to expand)
  - Collapses unrelated stack frames (tap to expand)
  - Moves React stack to it's own section
  - Formats React Stack like a stack frame
  - Collapses any React frames over 3 deep (tap to expand)
  - Adds a "Meta" information (to be expanded on later)
  - De-emphasizes the source map indicator
- Better Engineering
  - Rewrote almost all components to hooks (will follow up with the rest)
  - Added more tests for Data files
  - Added testes for UI components (previously there were none)
  - Refactored some imperative render code to declarative

## Known Problems

- The first major problem is that in the collapsed state (which is meant to model the FBLogger on Comet) does not show the user how many logs are in the console (only the count of the current log).
- The way we're doing symbolication and navigation is slow. We will follow up with perf improvements
- The React Stack logic is too simple and missed cases
- We need to get properly scaled images for the close button

## What's next

Next up we'll be:
- Move over Moti's improvements to filtering and YellowBox changes since I started this
- Adding in Errors, and not using the native redbox when LogBox is available
- Adding in a list of all errors and a way to navigate to it
- Adding in Logs, so users can see console.log in the app
- Make React stack frames clickable
- And many more

Reviewed By: cpojer

Differential Revision: D17965726

fbshipit-source-id: 2f28584ecb7e3ca8d3df034ea1e1a4a50e018c02
2019-10-21 21:08:02 -07:00
Yuanzhe Bian e515947dfe Back out "Convert scrollresponder dipatches to native commands"
Summary:
Revert D17983169 since it causes instant crash on AMA

Changelog: [Internal] Revert D17983169

Differential Revision: D18054783

fbshipit-source-id: 2b0957ee266dc034336eb157a5a343d051563389
2019-10-21 19:43:05 -07:00
Panagiotis Vekris e6a9f56c04 Rename exported class instances
Summary: Changelog: [Internal]

Reviewed By: TheSavior

Differential Revision: D18041015

fbshipit-source-id: a13b6c0fa064fb47f450a9f1c5304e3b896afe31
2019-10-21 19:11:50 -07:00
Samuel Susla 7796b7e9af Avoid use of shared_from_this in StateTarget
Summary:
`StateTarget` no longer uses `shared_from_this`, this allows us to remove need for `enable_shared_from_this`

I decided to put `state->commit` call inside `ShadowTree.cpp` because I needed to have access to `shared_ptr` of shadow node from outside of the class itself.
`state->commit` was originally designed to be only called by `ShadowNode` but this does not seem to be the case anymore since it is called from `UIManager` as well.

changelog: [internal]

Reviewed By: shergin

Differential Revision: D18032532

fbshipit-source-id: 75c874fd04f86adc07bfddbef3a0384e17c2067b
2019-10-21 17:18:36 -07:00
Ramanpreet Nara 32b2020031 Make RCTImageEditingManager and RCTImageStoreManager TurboModule-compatible
Summary:
**Note:** The specs for these NativeModules live within FBInternal. I just made `fbsource//xplat/js:FBReactNativeSpec` depend on the internal specs.

Changelog: [iOS][Added] Make RCTImageEditingManager and RCTImageStoreManager TurboModule-compatible

Reviewed By: shergin

Differential Revision: D17969820

fbshipit-source-id: c02bdb2e6e62ead98c64c49956d58ca80449892f
2019-10-21 17:15:33 -07:00
Ramanpreet Nara c8701b6b36 Make RCTLocalAssetImageLoader and RCTGIFImageDecoder TurboModule-compatible
Summary:
Couldn't make RCTImageEditingManager and RCTImageStoreManager TurboModule-compatible because their specs live in fb-internal code. I will tackle them in a subsequent diff. See T54946472.

Changelog: [iOS][Added] Make RCTLocalAssetImageLoader and RCTGIFImageDecoder TurboModule-compatible

Reviewed By: PeteTheHeat

Differential Revision: D17936483

fbshipit-source-id: 2266c9ea1ca7ecd52717d9a963e39245da312312
2019-10-21 17:15:33 -07:00
Ramanpreet Nara d8fda74c24 Move RCTImage NativeModules back to RCTImage
Summary:
In D16805827, I moved `RCTImageLoader`, `RCTImageStoreManager`, and `RCTImageEditingManager` to `CoreModules`. This was necessary to turn `RCTImageLoader` into a TurboModule. However, after D17671288 landed, it's no longer necessary to have OSS NativeModules in `CoreModules`. Therefore, I'm moving these NativeModules back to `RCTImage`.

Changelog: [iOS][Fixed] Move RCTImage NativeModules back to RCTImage

Reviewed By: shergin

Differential Revision: D17921612

fbshipit-source-id: 8ae36d2dc8deaf704313cbe2479bfa011ebcbfbc
2019-10-21 17:15:32 -07:00
Peter Argany 06599b3e59 Fix bug in iOS13 nested text rendering
Summary:
This fixes a bug reported by Oculus and OSS.

https://github.com/facebook/react-native/issues/26577

When rendering images nested in a `<Text/>` node, on the native side, `RCTTextShadowView` adds an empty NSTextAttachment to the attributed string to add some extra space. The image is then overlaid in the empty space  . This all works fine and dandy on iOS12 and below.

Starting in iOS13, an empty NSTextAttachment doesn't render as blank space. It renders as the "missing image" white page. When the real image is overlaid on the white page, it looks super broken. See github issue and test plan for examples.

This fix is to assign an empty image to `NSTextAttachment`. I tried seeing if there was any other attribute we could use to just add white space to an attributed string, but this seems like the best one.

Changelog: [iOS][Fixed] Fixed bug rendering nested text on iOS13

Reviewed By: xyin96

Differential Revision: D18048277

fbshipit-source-id: 711cee96934fc1937d694621a4417c152dde3a31
2019-10-21 16:31:05 -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
Frieder Bluemle ff6b2ff325 Update Gradle wrapper to 5.6.3 (#26915)
Summary:
Gradle wrapper `5.6.3`

## Changelog

[Android] [Changed] - Gradle wrapper 5.6.3
Pull Request resolved: https://github.com/facebook/react-native/pull/26915

Test Plan: Builds successfully.

Differential Revision: D18045686

Pulled By: mdvacca

fbshipit-source-id: b2cbe91c42c61aa340c1169d2555c9d821fcf11f
2019-10-21 13:30:52 -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
Luna Wei d61b381320 Convert scrollresponder dipatches to native commands
Summary: Changelog: [Internal] Convert scrollTo, scrollToEnd, flashScrollIndicators to use native commands

Reviewed By: TheSavior

Differential Revision: D17983169

fbshipit-source-id: 91bb3e6f0890f15717f0a8c15a8b65613856a71d
2019-10-21 11:34:55 -07:00
Andres Suarez d8560a838b Tidy up license headers [3/n]
Summary: Changelog: [General] [Fixed] - License header cleanup

Differential Revision: D18033336

fbshipit-source-id: 0334bfa2d61314de6ee9e7302205c08574abc0d9
2019-10-21 10:43:00 -07:00
Rick Hanlon 42ac240bce Don't wrap console methods for metro logging in Chrome debugger (#26883)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/26883

This diff fixes an issue reported in https://github.com/facebook/react-native/issues/26788 where logs in the Chrome console were showing a different location than previous versions.

In the change here, we stop wrapping the console functions to attach the metro websocket in any environment that isn't a native app environment. We do this by checking `global.nativeLoggingHook` which is bound only by native apps and not environments like the Chrome DevTools.

Changelog: [General][Fixed] - Fix wrong lines logging in Chrome debugger

Reviewed By: cpojer, gaearon

Differential Revision: D17951707

fbshipit-source-id: f045ea9abaa8aecc6afb8eca7db9842146a3d872
2019-10-21 10:05:40 -07:00