Summary:
Just increases the timeout as the E2E test runs
## Changelog:
[INTERNAL] - Add no_output_timeout: 30m to E2E jobs
Pull Request resolved: https://github.com/facebook/react-native/pull/39322
Test Plan: CI should be green
Reviewed By: cipolleschi
Differential Revision: D49056677
Pulled By: cortinico
fbshipit-source-id: c9b9af4b0fe2331a217438e303316a1f379c9e8d
Summary:
Fixes a critical networking path used commonly in graphics code, among many other use-cases. It is commonplace to store images within a single binary such as a GLB (see [KHR_binary_glTF](https://github.com/KhronosGroup/glTF/blob/main/extensions/1.0/Khronos/KHR_binary_glTF/README.md#overview)). Base64 encoded glTF can be critically slow in older browsers with an increased size, so it's not a suitable fallback for those targeting multiple platforms. Furthermore, large base64 payloads can cause crash behavior on native when passed via JSI (e.g. `expo-gl`). For textures, this can be several megabytes of high precision data, and a uri from a blob is preferred rather than writing platform-specific workarounds via the filesystem.
A user-land patch I've employed in [pmndrs/react-three-fiber](https://github.com/pmndrs/react-three-fiber), as well as [existing user-land patches](https://github.com/mrousavy/react-native-blob-jsi-helper), is to test the `Blob` constructor with an empty `ArrayBuffer`. `base64-js` is used here since it's already installed with `react-native` for binary utils elsewhere. This is declared as a dependency in the linked library since this is an implementation detail, but will be de-duplicated at install time.
```js
import { fromByteArray } from 'base64-js'
// Patch Blob for ArrayBuffer if unsupported
try {
new Blob([new ArrayBuffer(4)])
} catch (_) {
global.Blob = class extends Blob {
constructor(parts, options) {
super(
parts?.map((part) => {
if (part instanceof ArrayBuffer || ArrayBuffer.isView(part)) {
part = fromByteArray(new Uint8Array(part))
}
return part
}),
options,
)
}
}
}
```
## Changelog:
[INTERNAL] [FIXED] - Implement Blob from ArrayBuffer
Pull Request resolved: https://github.com/facebook/react-native/pull/39276
Test Plan:
Run the following at the project root to selectively test changes:
`jest packages/react-native/Libraries/Blob`
> **Note**: base64 encoding will add an additional ~33% size increase to binary data as part of this PR. This is padded to 4 bytes so a byte length of 4 will encode as 8. Native `ArrayBuffer` support would not have this behavior and remove the overhead of base64 encoding back and forth. This is a growing behavior across the networking stack, such as in `FileReader`.
Reviewed By: NickGerleman
Differential Revision: D48954160
Pulled By: dmytrorykun
fbshipit-source-id: 9d3b984aefe16bad2ee1088140b6e1160df52f55
Summary:
## Summary:
One of the most common diffs we have in React Native macOS is simply extending the `platforms` key Inside every pod spec to include macOS. React Native tvOS does the same to add tvOS. In the future, React Native may support visionOS, at which point we do the same thing again. Let's define a `min_supported_versions` hash that can be overridden at one place that is extensible to more platforms, instead of just specifying `min_ios_version_supported`.
Note: In doing this change, I have set it that `React-Hermes.podspec` doesn't build for macOS anymore. I think this is safe, since anyone using Hermes on macOS was probably using React Native macOS where we already have a diff to add macOS back?
## Changelog:
[IOS] [CHANGED] - Add min_supported_versions helper to cocoa pods scripts
Pull Request resolved: https://github.com/facebook/react-native/pull/39310
Test Plan: CI should pass.
Reviewed By: NickGerleman
Differential Revision: D49014109
Pulled By: dmytrorykun
fbshipit-source-id: d44fc7b750c70cc263a2c89502c022a0db9a4771
Summary:
Experimenting with Accessibility Inspector on iOS I've discovered that while when assigning `accessibilityRole="searchbox"` to a text input results in "Traits" reporting "Search Field" trait. However, when using ARIA-compatible `role="search"` such trait is not assigned, and text input will have an empty trait.
Afaiu this is incorrect as using `role="search"` and `accessibilityRole="searchbox"` should equivalent effect.
## Changelog:
<!-- Help reviewers and the release process by writing your own changelog entry.
Pick one each for the category and type tags:
[ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message
For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->
IOS FIXED - `role="searchbox"` now assigns "Search Field" accessibility trait to a view
Pull Request resolved: https://github.com/facebook/react-native/pull/39314
Test Plan: No UI changes, it affects only accessibility.
Reviewed By: NickGerleman
Differential Revision: D49014039
Pulled By: dmytrorykun
fbshipit-source-id: 5fb194e67fbf2ac339d9a746e3ce6aaed2d32558
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39291
X-link: https://github.com/facebook/yoga/pull/1359
This enables clang warnings around potentially unsafe conversions, such as those with mismatched signedness, or ones which may lead to truncation.
This should catch issues in local development which create errors for MSVC (e.g. Dash), who's default `/W3` includes warnings akin to `-Wshorten-64-to-32`.
This full set of warnings here is a tad spammy, but probably more useful than not.
Changelog: [Internal]
Reviewed By: yungsters
Differential Revision: D48954777
fbshipit-source-id: 1ccc07b99d09d1c2d428158149698ffd04025605
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39277
When we were reworking the Build logic in CI, we thought that the `test_ios` job and the `test_ios_rntester` jobs were the same. But, actually, they aren't.
So, now, we are seeing failures in the `test_ios` because its caches are not updated.
This changes remove the duplication of the two jobs, making sure that they use the same job, adding the possibility to run tests directly in rntester.
## Changelog:
[Internal] - Reuse test_ios_rntester to run iOS tests
Reviewed By: motiz88
Differential Revision: D48950096
fbshipit-source-id: e297d77fbd18f03873ed7a16a595e186d0e2453a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39306
This broke on Android platforms where `ReactFeatureFlags.enableViewRecycling` is enabled, as `setTransform` no longer directly mutates the transform properties, but instead goes through `setTransformProperty`
Changelog: [Internal]
Reviewed By: rshest
Differential Revision: D49008194
fbshipit-source-id: 7e5543b8ce79caaaf380f20010bdde69f6e212b1
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39311
## Changelog:
[Internal] -
Follow up to https://github.com/facebook/react-native/pull/39284 (D48960815), which landed and broke one of the build clauses on CircleCI tests (treating unused parameters as errors, even though they are expected to be unused).
Reviewed By: hoxyq
Differential Revision: D49010472
fbshipit-source-id: 469bf3a9923b85e465d4574e69e9372c16fbc125
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39307
Make it explicit that the second arg for the State update constructor is the old State object, which we use to increment the revision.
Changelog: [Internal]
Reviewed By: rshest
Differential Revision: D49008431
fbshipit-source-id: 649bdd136a4a6eb25858d8bfb7c41b725e593685
Summary:
We're well past a minimum iOS 10 / macOS 10.11 version. Let's remove these ifdefs that seemed to have been added for backwards compatibility around the use of [ArrayBuffers](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer)
## Changelog:
[IOS] [REMOVED] - Remove redundant ifdefs for ArrayBuffer backwards compatibility
Pull Request resolved: https://github.com/facebook/react-native/pull/39302
Test Plan: CI should pass.
Reviewed By: rshest
Differential Revision: D49007666
Pulled By: javache
fbshipit-source-id: 03ebe303eda45ce043e3c2f9e2a5165ba798b15c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39300
Changelog: [Internal]
`ReactCommon/hermes/inspector` and `ReactCommon/jsinspector` are unused in the React Native repo as of D48897203 and D48966244, respectively. Now that we've removed the last remaining references to them from internal Meta code, we can safely delete them from React Native.
Reviewed By: christophpurrer
Differential Revision: D48983212
fbshipit-source-id: 9a70178b19fb461c00a2304697b647b7bebe74c3
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39288
Forks `ReactCommon/jsinspector` → `ReactCommon/jsinspector-modern`.
The Gradle, CocoaPods and Buck builds of React Native have been updated to use `jsinspector` everywhere (outside of `ReactCommon/hermes/inspector`, which is itself dead code as of D48897203). The code in `ReactCommon/jsinspector` is thus deprecated and unused in the open source build, and will be deleted in an upcoming diff (likely before the 0.73 cut).
Changelog: [Internal]
Reviewed By: blakef
Differential Revision: D48966244
fbshipit-source-id: db81739da83ef9be73690d95d010065e3b3441c7
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39298
Previously, switches were being announced using Talkback in this order: [state][role][label] but they should be announced as [state][label][role].
Reviewed By: NickGerleman
Differential Revision: D48807314
fbshipit-source-id: e827b9ca6d3b61b5bd2884f0f0ce6ddae00bb7df
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39293
This QE is meant to change behavior to not throttle if `scrollEventThrottle` isn't set, but it's actually disabling throttling entirely.
This changes the gating to instead change the initialization path to set `_scrollEventThrottle = 0` when the QE is set.
`_scrollEventThrottle` is already set to zero when the `scrollEventThrottle` prop is removed/set to null, as the default value in ScrollViewProps.
Changelog: [internal]
Reviewed By: sammy-SC
Differential Revision: D48968754
fbshipit-source-id: c46c7f5093a60e326267c2e5f2f86dc2d545ac7f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39195
X-link: https://github.com/facebook/yoga/pull/1352
## This diff
This splits out all of the logic under `YGNodeCalculateLayout` to a couple of different files, does some mechanical renaming, and starts to split up the implementation a tiny bit. After this, core layout functions are all C++ convention and namespaced.
Each new file is marked as a move for the sake of blame history. It means Phabricator has a very inaccurate count of lines removed though.
## This stack
The organization of the C++ internals of Yoga are in need of attention.
1. Some of the C++ internals are namespaced, but others not.
2. Some of the namespaces include `detail`, but are meant to be used outside of the translation unit (FB Clang Tidy rules warn on any usage of these)
2. Most of the files are in a flat hierarchy, except for event tracing in its own folder
3. Some files and functions begin with YG, others don’t
4. Some functions are uppercase, others are not
5. Almost all of the interesting logic is in Yoga.cpp, and the file is too large to reason about
6. There are multiple grab bag files where folks put random functions they need in (Utils, BitUtils, Yoga-Internal.h)
7. There is no clear indication from file structure or type naming what is private vs not
8. Handles like `YGNodeRef` and `YGConfigRef` can be used to access internals just by importing headers
This stack does some much needed spring cleaning:
1. All non-public headers and C++ implementation details are in separate folders from the root level `yoga`. This will give us room to split up logic and add more files without too large a flat hierarchy
3. All private C++ internals are under the `facebook::yoga` namespace. Details namespaces are only ever used within the same header, as they are intended
4. Utils files are split
5. Most C++ internals drop the YG prefix
6. Most C++ internal function names are all lower camel case
7. We start to split up Yoga.cpp
8. Every header beginning with YG or at the top-level directory is public and C only, with the exception of Yoga-Internal.h which has non-public functions for bindings
9. It is not possible to use private APIs without static casting handles to internal classes
This will give us more leeway to continue splitting monolithic files, and consistent guidelines for style in new files as well.
These changes should not be breaking to any project using only public Yoga headers. This includes every usage of Yoga in fbsource except for RN Fabric which is currently tied to internals. This refactor should make that boundary clearer.
Reviewed By: rshest
Differential Revision: D48770478
fbshipit-source-id: 2a74b86441c3352de03ae193c98fc3a3573047ed
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39262
The use_hermes condition in React core was imprecise as using hermes is the default now. So, if USE_HERMES is not defined, then we are using hermes.
## Changelog:
[iOS][Fixed] - Use the right condition in React-Core for USE_HERMES.
Reviewed By: dmytrorykun
Differential Revision: D48907854
fbshipit-source-id: daeaa1782f23e0ab3992240e70f49ff0b2fd75de
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39261
This change allow us to control whether we want to install flipper or not in RNTester using an env var.
This is just a simple quality of life change to speed up local testing.
## Changelog:
[Internal] - Allow to control whether to install Flipper or not from an env variable
Reviewed By: dmytrorykun
Differential Revision: D48907743
fbshipit-source-id: ef0f9362890e2d66be55018622f9b3bf9620bd95
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39227
Changelog: [Internal]
1. Adds an `unstable_experiments` option to `createDevMiddleware` in `react-native/dev-middleware`.
2. Adds `enableCustomDebuggerFrontend` (default `false` for now) as an experiment flag controlling whether the new debugger frontend (D48680624, D48682302) is in use. We plan to enable this by default in RN 0.73 after additional testing.
If enabled, the new debugger frontend will only be used for the `/open-debugger` flow
Reviewed By: huntie
Differential Revision: D48602725
fbshipit-source-id: 598865b559478df1f19420daf3633ee6c233362a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39201
X-link: https://github.com/facebook/yoga/pull/1353
## This diff
This moves and renames `YGAssert`, and removes it from the public API, since external users should not need to call into internal Yoga assert functions, and the current API prevents us from making this a macro later to include the condition in the message.
## This stack
The organization of the C++ internals of Yoga are in need of attention.
1. Some of the C++ internals are namespaced, but others not.
2. Some of the namespaces include `detail`, but are meant to be used outside of the translation unit (FB Clang Tidy rules warn on any usage of these)
2. Most of the files are in a flat hierarchy, except for event tracing in its own folder
3. Some files and functions begin with YG, others don’t
4. Some functions are uppercase, others are not
5. Almost all of the interesting logic is in Yoga.cpp, and the file is too large to reason about
6. There are multiple grab bag files where folks put random functions they need in (Utils, BitUtils, Yoga-Internal.h)
7. There is no clear indication from file structure or type naming what is private vs not
8. Handles like `YGNodeRef` and `YGConfigRef` can be used to access internals just by importing headers
This stack does some much needed spring cleaning:
1. All non-public headers and C++ implementation details are in separate folders from the root level `yoga`. This will give us room to split up logic and add more files without too large a flat hierarchy
3. All private C++ internals are under the `facebook::yoga` namespace. Details namespaces are only ever used within the same header, as they are intended
4. Utils files are split
5. Most C++ internals drop the YG prefix
6. Most C++ internal function names are all lower camel case
7. We start to split up Yoga.cpp
8. Every header beginning with YG or at the top-level directory is public and C only, with the exception of Yoga-Internal.h which has non-public functions for bindings
9. It is not possible to use private APIs without static casting handles to internal classes
This will give us more leeway to continue splitting monolithic files, and consistent guidelines for style in new files as well.
These changes should not be breaking to any project using only public Yoga headers. This includes every usage of Yoga in fbsource except for RN Fabric which is currently tied to internals. This refactor should make that boundary clearer.
Reviewed By: rshest
Differential Revision: D48769809
fbshipit-source-id: b5480ac54781bc01b00c158b07d2d751fac87d37
Summary:
X-link: https://github.com/facebook/yoga/pull/1355
Pull Request resolved: https://github.com/facebook/react-native/pull/39198
## This diff
This splits up `Yoga-internal.h` which has become a grab bag. The actual header is left, with the purpose of being a private C ABI for bindings, but everything else is moved to a place more appropriate or removed.
A few notes:
1. `yoga::isUndefined` is replaced with `std::isnan` to avoid a layer of indirection (we will never be able to change its representation anyway). Internal usages of `YGFloatIsUndefined` are also replaced with `std::isnan` since the previous being at a library boundary means I'm not sure it can be inlined/.
2. `leading`, `trailing` arrays are factored into proper functions
3. `Values` is replaced entirely with `std::array`, since most of it was unused.
## This stack
The organization of the C++ internals of Yoga are in need of attention.
1. Some of the C++ internals are namespaced, but others not.
2. Some of the namespaces include `detail`, but are meant to be used outside of the translation unit (FB Clang Tidy rules warn on any usage of these)
2. Most of the files are in a flat hierarchy, except for event tracing in its own folder
3. Some files and functions begin with YG, others don’t
4. Some functions are uppercase, others are not
5. Almost all of the interesting logic is in Yoga.cpp, and the file is too large to reason about
6. There are multiple grab bag files where folks put random functions they need in (Utils, BitUtils, Yoga-Internal.h)
7. There is no clear indication from file structure or type naming what is private vs not
8. Handles like `YGNodeRef` and `YGConfigRef` can be used to access internals just by importing headers
This stack does some much needed spring cleaning:
1. All non-public headers and C++ implementation details are in separate folders from the root level `yoga`. This will give us room to split up logic and add more files without too large a flat hierarchy
3. All private C++ internals are under the `facebook::yoga` namespace. Details namespaces are only ever used within the same header, as they are intended
4. Utils files are split
5. Most C++ internals drop the YG prefix
6. Most C++ internal function names are all lower camel case
7. We start to split up Yoga.cpp
8. Every header beginning with YG or at the top-level directory is public and C only, with the exception of Yoga-Internal.h which has non-public functions for bindings
9. It is not possible to use private APIs without static casting handles to internal classes
This will give us more leeway to continue splitting monolithic files, and consistent guidelines for style in new files as well.
These changes should not be breaking to any project using only public Yoga headers. This includes every usage of Yoga in fbsource except for RN Fabric which is currently tied to internals. This refactor should make that boundary clearer.
Reviewed By: rshest
Differential Revision: D48769241
fbshipit-source-id: 5b8e2192309539e7c133c3b3b29b445b59dd5835
Summary:
This changes Clang format config to enforce left pointer alignment instead of right, in accordance with https://www.internalfb.com/intern/wiki/Cpp/CppStyle/
Changelog: [Internal]
bypass-github-export-checks
Reviewed By: sammy-SC
Differential Revision: D48952040
fbshipit-source-id: 108329b2f11d2041a31dee3334c7801d69a3f1ad
Summary:
Currently Android fails to build on Windows, because CMake cannot work with
native Windows paths that are passed to it as build arguments. This change
converts the input paths to the CMake format.
## Changelog:
[Android] [Fixed] - Fix building Android on Windows.
Pull Request resolved: https://github.com/facebook/react-native/pull/39190
Test Plan: Build the React Native Android project on Windows. It should complete successfully.
Reviewed By: NickGerleman
Differential Revision: D48948140
Pulled By: cortinico
fbshipit-source-id: 6d584c2a10e683cdb6df0dd6dcd5875da7e06e2b
Summary:
I've seen that this throws a warning:
```
<ImageBackground source={{ uri: undefined }}>
```
But this is properly working, without a warning, thus, I believe the code is allowing it:
```
<ImageBackground source={isLoading ? undefined : { uri: 'https://....' }}>
```
## Changelog:
[GENERAL] [CHANGED] - Fixed `source` in `Image` type
Pull Request resolved: https://github.com/facebook/react-native/pull/39230
Test Plan: Not necessary. It's just a DOC change
Reviewed By: rshest
Differential Revision: D48939824
Pulled By: NickGerleman
fbshipit-source-id: fca2e07b7b4d4b947e365bb9d82fcf4cea484951
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39253
X-link: https://github.com/facebook/hermes/pull/1112
Changelog: [Internal]
Forks `ReactCommon/hermes/inspector` → `ReactCommon/hermes/inspector-modern`. More changes to `inspector-modern` will come in subsequent diffs.
The Gradle, CocoaPods and Buck builds of React Native have been updated to use `inspector-modern` everywhere. The code in `ReactCommon/hermes/inspector` is thus **deprecated** and unused in the open source build, and will be deleted in an upcoming diff (likely before the 0.73 cut).
NOTE: The reason we're not immediately deleting `ReactCommon/hermes/inspector` is that there are a handful of references to it in Meta's internal monorepo (*outside of React Native*) that we are in the process of migrating away. Once we've deleted the existing `ReactCommon/hermes/inspector`, we *may* rename `inspector-modern` back to `inspector`.
Reviewed By: blakef
Differential Revision: D48897203
fbshipit-source-id: 13682747d280a3231b7f6bce560f25ad174304e9
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39264
X-link: https://github.com/facebook/hermes/pull/1113
Since C++20, the type of a `u8"..."` string literal is `const char8_t[N]` whereas prior to C++20 the type is `const char[N]`. `char8_t` has the same size, alignment, and signedness as `unsigned char` but is a different type from `unsigned char`, as well as being a different type from `signed char` and from `char`.
In context, the uses of the `u8"..."` expect `const char*` (to which `const char[N]` decays) and not `const char8_t*` (to which `const char8_t[N]` decays). To fit the string to the context since C++20, we must `reinterpret_cast` to `const char*`; this is a type-level no-op prior to C++20.
Changelog: [Internal]
Reviewed By: christophpurrer
Differential Revision: D48908076
fbshipit-source-id: e68d8fc4ff9dfb9528846901e37e2775c2b98866
Summary:
Previously, when you tried to create some styles using `StyleSheet.create`, you can create styles with invalid styles:
```ts
const styles = StyleSheet.create({
container: {
marginLeft: 1,
magrinRight: 1, // This is a typo, but would not cause typecheck errors
},
});
```
The root cause is that Typescript uses a looser [Excess Property Checks](https://www.typescriptlang.org/docs/handbook/2/objects.html#excess-property-checks) if we're using template types rather than using the actual specific types in the function signature.
- https://github.com/DefinitelyTyped/DefinitelyTyped/discussions/62481
## Changelog:
[INTERNAL] [FIXED] - Make StyleSheet.create better check property keys for typos
Pull Request resolved: https://github.com/facebook/react-native/pull/39225
Test Plan: Added a test in __typeTests__, which should get run by CI.
Reviewed By: rshest
Differential Revision: D48859679
Pulled By: NickGerleman
fbshipit-source-id: 43aa69cf85cd69353d053b782dba73ab2027eb64
Summary:
This PR adds transform-origin support for android to make it easier to review. https://github.com/facebook/react-native/pull/37606#pullrequestreview-1513082850 by javache. I'll answer feedback from javache below.
## Changelog:
[Android] [ADDED] - Transform origin
<!-- Help reviewers and the release process by writing your own changelog entry.
Pick one each for the category and type tags:
[ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message
For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
Pull Request resolved: https://github.com/facebook/react-native/pull/38558
Test Plan: Run iOS RNTester app in old architecture and test transform-origin example in `TransformExample.js`.
Reviewed By: NickGerleman
Differential Revision: D48528339
Pulled By: javache
fbshipit-source-id: e255a7f364e57396dada60b2c69c724cec406f51
Summary:
This PR adds transform-origin support for iOS fabric. This PR also incorporates feedback/changes suggested by javache in the original [PR.](https://github.com/facebook/react-native/pull/37606)
## Changelog:
[IOS] [ADDED] - Fabric Transform origin
<!-- Help reviewers and the release process by writing your own changelog entry.
Pick one each for the category and type tags:
[ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message
For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
Pull Request resolved: https://github.com/facebook/react-native/pull/38559
Test Plan: Run iOS RNTester app in old architecture and test transform-origin example in `TransformExample.js`.
Reviewed By: NickGerleman
Differential Revision: D48528363
Pulled By: javache
fbshipit-source-id: 347b7c5896ad19ad24278de81b0e055e4cb01016
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39239
We can avoid static guards and heap allocation memory by forcing a default initialized shared_ptr (which is constexpr), and telling the compiler to not bother with registering a destructor, as these shared_ptr will never hold a value.
Changelog: [Internal]
Reviewed By: rshest
Differential Revision: D48867013
fbshipit-source-id: c31f535bb19382878c9f21d7145188bd91b63265