react-native-windows 0.82.3 → 0.83.0-preview.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (224) hide show
  1. package/.flowconfig +2 -7
  2. package/Libraries/Animated/components/AnimatedFlatList.js +5 -3
  3. package/Libraries/Animated/components/AnimatedImage.js +4 -3
  4. package/Libraries/Animated/components/AnimatedSectionList.js +2 -2
  5. package/Libraries/Animated/components/AnimatedText.js +7 -3
  6. package/Libraries/Animated/components/AnimatedView.js +3 -2
  7. package/Libraries/Animated/createAnimatedComponent.js +24 -12
  8. package/Libraries/Animated/nodes/AnimatedColor.js +26 -10
  9. package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.js +43 -15
  10. package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.windows.js +43 -15
  11. package/Libraries/Components/ActivityIndicator/ActivityIndicator.d.ts +2 -2
  12. package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.d.ts +2 -2
  13. package/Libraries/Components/Glyph/Glyph.js +4 -1
  14. package/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.d.ts +2 -2
  15. package/Libraries/Components/RefreshControl/RefreshControl.d.ts +3 -3
  16. package/Libraries/Components/SafeAreaView/SafeAreaView.d.ts +2 -2
  17. package/Libraries/Components/ScrollView/ScrollView.js +1 -0
  18. package/Libraries/Components/ScrollView/ScrollView.windows.js +1 -0
  19. package/Libraries/Components/ScrollView/ScrollViewStickyHeader.js +6 -6
  20. package/Libraries/Components/Switch/Switch.d.ts +2 -2
  21. package/Libraries/Components/Switch/Switch.windows.js +1 -1
  22. package/Libraries/Components/TextInput/TextInput.d.ts +2 -5
  23. package/Libraries/Components/TextInput/TextInput.js +6 -0
  24. package/Libraries/Components/TextInput/TextInput.windows.js +6 -0
  25. package/Libraries/Components/Touchable/TouchableBounce.js +7 -7
  26. package/Libraries/Components/Touchable/TouchableBounce.windows.js +7 -7
  27. package/Libraries/Components/Touchable/TouchableWithoutFeedback.windows.js +1 -1
  28. package/Libraries/Components/View/ReactNativeStyleAttributes.js +19 -1
  29. package/Libraries/Components/View/View.d.ts +2 -2
  30. package/Libraries/Components/View/View.windows.js +0 -1
  31. package/Libraries/Components/View/ViewNativeComponent.js +13 -1
  32. package/Libraries/Core/ReactNativeVersion.js +3 -3
  33. package/Libraries/Core/setUpPerformance.js +2 -0
  34. package/Libraries/Debugging/DebuggingOverlay.js +14 -14
  35. package/Libraries/Debugging/DebuggingOverlayRegistry.js +8 -2
  36. package/Libraries/EventEmitter/RCTDeviceEventEmitter.js +5 -2
  37. package/Libraries/Image/Image.d.ts +3 -3
  38. package/Libraries/Image/ImageInjection.js +3 -6
  39. package/Libraries/Image/ImageTypes.flow.js +3 -7
  40. package/Libraries/Lists/FlatList.js +8 -8
  41. package/Libraries/Lists/SectionList.d.ts +5 -1
  42. package/Libraries/Lists/ViewabilityHelper.js +1 -1
  43. package/Libraries/Lists/VirtualizedList.js +1 -0
  44. package/Libraries/LogBox/UI/AnsiHighlight.js +4 -1
  45. package/Libraries/NativeComponent/BaseViewConfig.android.js +11 -2
  46. package/Libraries/NativeComponent/NativeComponentRegistry.d.ts +98 -0
  47. package/Libraries/NativeComponent/NativeComponentRegistry.js +2 -0
  48. package/Libraries/NativeComponent/NativeComponentRegistryUnstable.js +3 -1
  49. package/Libraries/NativeComponent/ViewConfigIgnore.windows.js +45 -0
  50. package/Libraries/Network/RCTNetworking.android.js +3 -1
  51. package/Libraries/Network/RCTNetworking.ios.js +3 -0
  52. package/Libraries/Network/RCTNetworking.windows.js +3 -0
  53. package/Libraries/Network/XMLHttpRequest.js +1 -41
  54. package/Libraries/Pressability/usePressability.js +14 -3
  55. package/Libraries/ReactNative/PaperUIManager.windows.js +3 -3
  56. package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstance.js +20 -82
  57. package/Libraries/ReactNative/getNativeComponentAttributes.js +12 -0
  58. package/Libraries/Renderer/implementations/ReactFabric-dev.js +6759 -4478
  59. package/Libraries/Renderer/implementations/ReactFabric-prod.js +3169 -3119
  60. package/Libraries/Renderer/implementations/ReactFabric-profiling.js +4732 -3535
  61. package/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js +6646 -4070
  62. package/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js +3136 -2825
  63. package/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js +4761 -3312
  64. package/Libraries/Renderer/shims/ReactNative.js +3 -1
  65. package/Libraries/Renderer/shims/ReactNativeTypes.js +2 -1
  66. package/Libraries/Renderer/shims/ReactNativeTypes.windows.js +2 -1
  67. package/Libraries/StyleSheet/StyleSheetTypes.d.ts +1 -1
  68. package/Libraries/StyleSheet/StyleSheetTypes.js +44 -0
  69. package/Libraries/StyleSheet/processBackgroundPosition.js +284 -0
  70. package/Libraries/StyleSheet/processBackgroundRepeat.js +105 -0
  71. package/Libraries/StyleSheet/processBackgroundSize.js +104 -0
  72. package/Libraries/Text/Text.d.ts +2 -2
  73. package/Libraries/Text/TextNativeComponent.js +10 -0
  74. package/Libraries/TurboModule/TurboModuleRegistry.js +3 -9
  75. package/Libraries/Utilities/DevLoadingView.js +14 -6
  76. package/Libraries/Utilities/HMRClient.js +13 -5
  77. package/Microsoft.ReactNative/CompositionComponentView.idl +2 -0
  78. package/Microsoft.ReactNative/CompositionHwndHost.idl +1 -0
  79. package/Microsoft.ReactNative/Fabric/ComponentView.cpp +1 -1
  80. package/Microsoft.ReactNative/Fabric/ComponentView.h +1 -1
  81. package/Microsoft.ReactNative/Fabric/Composition/CompositionEventHandler.cpp +2 -52
  82. package/Microsoft.ReactNative/Fabric/Composition/CompositionHwndHost.cpp +10 -40
  83. package/Microsoft.ReactNative/Fabric/Composition/CompositionViewComponentView.cpp +3 -80
  84. package/Microsoft.ReactNative/Fabric/Composition/ContentIslandComponentView.cpp +45 -12
  85. package/Microsoft.ReactNative/Fabric/Composition/ContentIslandComponentView.h +8 -0
  86. package/Microsoft.ReactNative/Fabric/Composition/Modal/WindowsModalHostViewComponentView.cpp +61 -74
  87. package/Microsoft.ReactNative/Fabric/Composition/ParagraphComponentView.h +4 -0
  88. package/Microsoft.ReactNative/Fabric/Composition/ReactCompositionViewComponentBuilder.h +1 -0
  89. package/Microsoft.ReactNative/Fabric/Composition/ReactNativeIsland.cpp +4 -3
  90. package/Microsoft.ReactNative/Fabric/Composition/ReactNativeIsland.h +2 -1
  91. package/Microsoft.ReactNative/Fabric/Composition/ReactNativeWindow.cpp +245 -0
  92. package/Microsoft.ReactNative/Fabric/Composition/ReactNativeWindow.h +80 -0
  93. package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentDescriptor.h +20 -36
  94. package/Microsoft.ReactNative/Fabric/Composition/UriImageManager.cpp +5 -0
  95. package/Microsoft.ReactNative/IReactCompositionViewComponentBuilder.idl +1 -0
  96. package/Microsoft.ReactNative/Modules/ImageViewManagerModule.cpp +1 -1
  97. package/Microsoft.ReactNative/Modules/LogBoxModule.cpp +20 -94
  98. package/Microsoft.ReactNative/Modules/LogBoxModule.h +1 -3
  99. package/Microsoft.ReactNative/ReactNativeAppBuilder.cpp +0 -41
  100. package/Microsoft.ReactNative/ReactNativeAppBuilder.idl +0 -11
  101. package/Microsoft.ReactNative/ReactNativeIsland.idl +2 -3
  102. package/Microsoft.ReactNative/ReactNativeWin32App.cpp +31 -101
  103. package/Microsoft.ReactNative/ReactNativeWin32App.h +2 -13
  104. package/Microsoft.ReactNative/ReactNativeWindow.idl +44 -0
  105. package/Microsoft.ReactNative.Cxx/AutoDraw.h +9 -1
  106. package/Microsoft.ReactNative.Cxx/ReactCommon/CallInvoker.h +13 -16
  107. package/Microsoft.ReactNative.Cxx/ReactCommon/TurboModule.h +24 -36
  108. package/Microsoft.ReactNative.Cxx/ReactCommon/TurboModuleUtils.h +5 -8
  109. package/Microsoft.ReactNative.Cxx/ReactCommon/react/bridging/AString.h +8 -6
  110. package/Microsoft.ReactNative.Cxx/ReactCommon/react/bridging/Array.h +32 -49
  111. package/Microsoft.ReactNative.Cxx/ReactCommon/react/bridging/Base.h +27 -76
  112. package/Microsoft.ReactNative.Cxx/ReactCommon/react/bridging/Bool.h +4 -2
  113. package/Microsoft.ReactNative.Cxx/ReactCommon/react/bridging/CallbackWrapper.h +19 -18
  114. package/Microsoft.ReactNative.Cxx/ReactCommon/react/bridging/Class.h +25 -48
  115. package/Microsoft.ReactNative.Cxx/ReactCommon/react/bridging/Convert.h +38 -31
  116. package/Microsoft.ReactNative.Cxx/ReactCommon/react/bridging/Error.h +11 -6
  117. package/Microsoft.ReactNative.Cxx/ReactCommon/react/bridging/EventEmitter.h +47 -45
  118. package/Microsoft.ReactNative.Cxx/ReactCommon/react/bridging/Function.h +69 -89
  119. package/Microsoft.ReactNative.Cxx/ReactCommon/react/bridging/HighResTimeStamp.h +8 -8
  120. package/Microsoft.ReactNative.Cxx/ReactCommon/react/bridging/LongLivedObject.h +6 -6
  121. package/Microsoft.ReactNative.Cxx/ReactCommon/react/bridging/Number.h +16 -8
  122. package/Microsoft.ReactNative.Cxx/ReactCommon/react/bridging/Object.h +17 -24
  123. package/Microsoft.ReactNative.Cxx/ReactCommon/react/bridging/Promise.h +17 -17
  124. package/Microsoft.ReactNative.Cxx/ReactCommon/react/bridging/Value.h +20 -29
  125. package/Microsoft.ReactNative.Cxx/ReactCommon/react/debug/react_native_assert.h +2 -7
  126. package/Microsoft.ReactNative.Cxx/ReactCommon/react/timing/primitives.h +127 -115
  127. package/PropertySheets/Generated/PackageVersion.g.props +5 -5
  128. package/PropertySheets/Warnings.props +2 -1
  129. package/ReactCommon/ReactCommon.vcxproj +11 -2
  130. package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/CxxNativeModule.cpp +2 -2
  131. package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/Instance.cpp +4 -2
  132. package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/JSExecutor.cpp +4 -2
  133. package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/JSIndexedRAMBundle.cpp +4 -2
  134. package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/MethodCall.cpp +4 -2
  135. package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/ModuleRegistry.cpp +5 -3
  136. package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/NativeToJsBridge.cpp +4 -4
  137. package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/RAMBundleRegistry.cpp +6 -4
  138. package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/ReactMarker.cpp +2 -0
  139. package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/TraceSection.h +25 -35
  140. package/ReactCommon/TEMP_UntilReactCommonUpdate/jsi/jsi/test/testlib.cpp +86 -67
  141. package/ReactCommon/TEMP_UntilReactCommonUpdate/jsiexecutor/jsireact/JSIExecutor.cpp +15 -8
  142. package/ReactCommon/TEMP_UntilReactCommonUpdate/jsiexecutor/jsireact/JSINativeModules.cpp +4 -2
  143. package/ReactCommon/TEMP_UntilReactCommonUpdate/jsinspector-modern/NetworkIOAgent.cpp +84 -68
  144. package/ReactCommon/TEMP_UntilReactCommonUpdate/jsinspector-modern/NetworkIOAgent.h +31 -35
  145. package/ReactCommon/TEMP_UntilReactCommonUpdate/jsinspector-modern/Utf8.h +4 -5
  146. package/ReactCommon/TEMP_UntilReactCommonUpdate/jsinspector-modern/network/HttpUtils.cpp +2 -1
  147. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/nativemodule/core/ReactCommon/TurboModule.h +24 -36
  148. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/nativemodule/dom/NativeDOM.h +28 -66
  149. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/nativemodule/webperformance/NativePerformance.cpp +5 -0
  150. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/componentregistry/ComponentDescriptorRegistry.cpp +3 -3
  151. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/image/conversions.h +8 -4
  152. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/text/ParagraphShadowNode.cpp +19 -16
  153. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/text/platform/android/react/renderer/components/text/ParagraphState.h +8 -9
  154. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/AccessibilityPrimitives.h +25 -95
  155. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/accessibilityPropsConversions.h +85 -42
  156. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/core/EventDispatcher.cpp +2 -0
  157. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/core/EventQueueProcessor.cpp +2 -0
  158. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/imagemanager/primitives.h +25 -31
  159. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/uimanager/UIManager.cpp +19 -5
  160. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/runtime/ReactInstance.cpp +16 -1
  161. package/Scripts/Tfs/Layout-Desktop-Headers.ps1 +1 -15
  162. package/Scripts/creaternwapp.cmd +1 -1
  163. package/Scripts/perf/compare-results.js +357 -0
  164. package/Scripts/perf/create-perf-test.js +343 -0
  165. package/Scripts/perf/post-pr-comment.js +210 -0
  166. package/Shared/Hermes/HermesRuntimeTargetDelegate.cpp +8 -0
  167. package/Shared/Hermes/HermesRuntimeTargetDelegate.h +3 -0
  168. package/Shared/Shared.vcxitems +15 -3
  169. package/Shared/Shared.vcxitems.filters +11 -3
  170. package/codegen/NativeIntersectionObserverSpec.g.h +2 -0
  171. package/codegen/NativeNetworkingIOSSpec.g.h +2 -0
  172. package/codegen/NativePerformanceSpec.g.h +6 -0
  173. package/codegen/NativeReactNativeFeatureFlagsSpec.g.h +229 -139
  174. package/codegen/react/components/rnwcore/ActivityIndicatorView.g.h +2 -1
  175. package/codegen/react/components/rnwcore/AndroidDrawerLayout.g.h +42 -25
  176. package/codegen/react/components/rnwcore/AndroidHorizontalScrollContentView.g.h +2 -1
  177. package/codegen/react/components/rnwcore/AndroidProgressBar.g.h +2 -1
  178. package/codegen/react/components/rnwcore/AndroidSwipeRefreshLayout.g.h +11 -6
  179. package/codegen/react/components/rnwcore/AndroidSwitch.g.h +11 -6
  180. package/codegen/react/components/rnwcore/DebuggingOverlay.g.h +1 -0
  181. package/codegen/react/components/rnwcore/InputAccessory.g.h +2 -1
  182. package/codegen/react/components/rnwcore/ModalHostView.g.h +40 -23
  183. package/codegen/react/components/rnwcore/Props.cpp +6 -1
  184. package/codegen/react/components/rnwcore/Props.h +1 -0
  185. package/codegen/react/components/rnwcore/PullToRefreshView.g.h +11 -6
  186. package/codegen/react/components/rnwcore/SafeAreaView.g.h +1 -0
  187. package/codegen/react/components/rnwcore/Switch.g.h +11 -6
  188. package/codegen/react/components/rnwcore/UnimplementedNativeView.g.h +2 -1
  189. package/codegen/react/components/rnwcore/VirtualView.g.h +41 -8
  190. package/codegen/react/components/rnwcore/VirtualViewExperimental.g.h +45 -8
  191. package/codegen/rnwcoreJSI.h +3973 -6059
  192. package/index.js +6 -0
  193. package/index.windows.js +6 -0
  194. package/jest/mockComponent.js +6 -6
  195. package/jest/setup.js +15 -10
  196. package/package.json +27 -27
  197. package/src/private/components/virtualview/VirtualView.js +22 -27
  198. package/src/private/components/virtualview/VirtualViewExperimentalNativeComponent.js +6 -0
  199. package/src/private/featureflags/ReactNativeFeatureFlags.js +100 -19
  200. package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +18 -3
  201. package/src/private/setup/setUpDefaultReactNativeEnvironment.js +6 -0
  202. package/src/private/specs_DEPRECATED/components/SwitchNativeComponent.js +1 -1
  203. package/src/private/specs_DEPRECATED/modules/NativeNetworkingIOS.js +1 -0
  204. package/src/private/webapis/dom/nodes/ReactNativeElement.js +12 -2
  205. package/src/private/webapis/intersectionobserver/IntersectionObserver.js +76 -15
  206. package/src/private/webapis/intersectionobserver/internals/IntersectionObserverManager.js +1 -0
  207. package/src/private/webapis/intersectionobserver/specs/NativeIntersectionObserver.js +1 -0
  208. package/src/private/webapis/performance/ResourceTiming.js +31 -4
  209. package/src/private/webapis/performance/internals/RawPerformanceEntry.js +4 -1
  210. package/src/private/webapis/performance/specs/NativePerformance.js +3 -0
  211. package/stubs/double-conversion/double-conversion.h +5 -0
  212. package/templates/cpp-app/template.config.js +1 -1
  213. package/templates/cpp-app/windows/MyApp/MyApp.vcxproj +1 -1
  214. package/templates/cpp-lib/template.config.js +1 -1
  215. package/templates/cpp-lib/windows/MyLib/MyLib.vcxproj +1 -1
  216. package/types/index.d.ts +1 -0
  217. package/types/public/ReactNativeTypes.d.ts +115 -2
  218. package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricHostComponent.js +0 -152
  219. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/BaseViewProps.cpp +0 -628
  220. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/conversions.h +0 -1574
  221. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/core/ShadowNode.cpp +0 -528
  222. package/Scripts/OpenSSL.nuspec +0 -39
  223. package/Scripts/OpenSSL.targets +0 -36
  224. package/codegen/rnwcoreJSI-generated.cpp +0 -3470
@@ -7,7 +7,7 @@
7
7
 
8
8
  #include "CxxNativeModule.h"
9
9
 
10
- #ifndef RCT_FIT_RM_OLD_RUNTIME
10
+ #ifndef RCT_REMOVE_LEGACY_ARCH
11
11
 
12
12
  #include "Instance.h"
13
13
 
@@ -256,4 +256,4 @@ void CxxNativeModule::lazyInit() {
256
256
 
257
257
  } // namespace facebook::react
258
258
 
259
- #endif // RCT_FIT_RM_OLD_RUNTIME
259
+ #endif // RCT_REMOVE_LEGACY_ARCH
@@ -5,13 +5,14 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
+
8
9
  #if _MSC_VER
9
10
  #pragma warning(push)
10
11
  #pragma warning(disable : 4996) // deprecated APIs
11
12
  #endif
12
13
  #include "Instance.h"
13
14
 
14
- #ifndef RCT_FIT_RM_OLD_RUNTIME
15
+ #ifndef RCT_REMOVE_LEGACY_ARCH
15
16
 
16
17
  #include "ErrorUtils.h"
17
18
  #include "JSBigString.h"
@@ -373,7 +374,8 @@ void Instance::JSCallInvoker::scheduleAsync(CallFunc&& work) noexcept {
373
374
 
374
375
  } // namespace facebook::react
375
376
 
376
- #endif // RCT_FIT_RM_OLD_RUNTIME
377
+ #endif // RCT_REMOVE_LEGACY_ARCH
378
+
377
379
  #if _MSC_VER
378
380
  #pragma warning(pop)
379
381
  #endif
@@ -5,6 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
+
8
9
  #if _MSC_VER
9
10
  #pragma warning(push)
10
11
  #pragma warning(disable : 4996) // deprecated APIs
@@ -22,11 +23,11 @@ namespace facebook::react {
22
23
  std::string JSExecutor::getSyntheticBundlePath(
23
24
  uint32_t bundleId,
24
25
  const std::string& bundlePath) {
25
- #ifndef RCT_FIT_RM_OLD_RUNTIME
26
+ #ifndef RCT_REMOVE_LEGACY_ARCH
26
27
  if (bundleId == RAMBundleRegistry::MAIN_BUNDLE_ID) {
27
28
  return bundlePath;
28
29
  }
29
- #endif // RCT_FIT_RM_OLD_RUNTIME
30
+ #endif // RCT_REMOVE_LEGACY_ARCH
30
31
 
31
32
  std::array<char, 32> buffer{};
32
33
  std::snprintf(buffer.data(), buffer.size(), "seg-%u.js", bundleId);
@@ -42,6 +43,7 @@ JSExecutor::getRuntimeTargetDelegate() {
42
43
  }
43
44
 
44
45
  } // namespace facebook::react
46
+
45
47
  #if _MSC_VER
46
48
  #pragma warning(pop)
47
49
  #endif
@@ -5,13 +5,14 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
+
8
9
  #if _MSC_VER
9
10
  #pragma warning(push)
10
11
  #pragma warning(disable : 4996) // deprecated APIs
11
12
  #endif
12
13
  #include "JSIndexedRAMBundle.h"
13
14
 
14
- #ifndef RCT_FIT_RM_OLD_RUNTIME
15
+ #ifndef RCT_REMOVE_LEGACY_ARCH
15
16
 
16
17
  #include <glog/logging.h>
17
18
  #include <fstream>
@@ -137,7 +138,8 @@ void JSIndexedRAMBundle::readBundle(
137
138
 
138
139
  } // namespace facebook::react
139
140
 
140
- #endif // RCT_FIT_RM_OLD_RUNTIME
141
+ #endif // RCT_REMOVE_LEGACY_ARCH
142
+
141
143
  #if _MSC_VER
142
144
  #pragma warning(pop)
143
145
  #endif
@@ -5,13 +5,14 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
+
8
9
  #if _MSC_VER
9
10
  #pragma warning(push)
10
11
  #pragma warning(disable : 4996) // deprecated APIs
11
12
  #endif
12
13
  #include "MethodCall.h"
13
14
 
14
- #ifndef RCT_FIT_RM_OLD_RUNTIME
15
+ #ifndef RCT_REMOVE_LEGACY_ARCH
15
16
 
16
17
  #include <folly/json.h>
17
18
  #include <stdexcept>
@@ -92,7 +93,8 @@ std::vector<MethodCall> parseMethodCalls(folly::dynamic&& jsonData) {
92
93
 
93
94
  } // namespace facebook::react
94
95
 
95
- #endif // RCT_FIT_RM_OLD_RUNTIME
96
+ #endif // RCT_REMOVE_LEGACY_ARCH
97
+
96
98
  #if _MSC_VER
97
99
  #pragma warning(pop)
98
100
  #endif
@@ -5,13 +5,14 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
+
8
9
  #if _MSC_VER
9
10
  #pragma warning(push)
10
11
  #pragma warning(disable : 4996) // deprecated APIs
11
12
  #endif
12
13
  #include "ModuleRegistry.h"
13
14
 
14
- #ifndef RCT_FIT_RM_OLD_RUNTIME
15
+ #ifndef RCT_REMOVE_LEGACY_ARCH
15
16
 
16
17
  #include <glog/logging.h>
17
18
  #include <reactperflogger/BridgeNativeModulePerfLogger.h>
@@ -194,7 +195,7 @@ std::optional<ModuleConfig> ModuleRegistry::getConfig(const std::string& name) {
194
195
  // no constants or methods
195
196
  return std::nullopt;
196
197
  } else {
197
- return ModuleConfig{index, std::move(config)};
198
+ return ModuleConfig{.index = index, .config = std::move(config)};
198
199
  }
199
200
  }
200
201
 
@@ -248,7 +249,8 @@ MethodCallResult ModuleRegistry::callSerializableNativeHook(
248
249
 
249
250
  } // namespace facebook::react
250
251
 
251
- #endif // RCT_FIT_RM_OLD_RUNTIME
252
+ #endif // RCT_REMOVE_LEGACY_ARCH
253
+
252
254
  #if _MSC_VER
253
255
  #pragma warning(pop)
254
256
  #endif
@@ -12,7 +12,7 @@
12
12
 
13
13
  #include "NativeToJsBridge.h"
14
14
 
15
- #ifndef RCT_FIT_RM_OLD_RUNTIME
15
+ #ifndef RCT_REMOVE_LEGACY_ARCH
16
16
 
17
17
  #include <ReactCommon/CallInvoker.h>
18
18
  #include <folly/json.h>
@@ -43,8 +43,8 @@ namespace facebook::react {
43
43
 
44
44
  // This class manages calls from JS to native code.
45
45
  class [[deprecated(
46
- "This API will be removed along with the legacy architecture.")]] JsToNativeBridge
47
- : public react::ExecutorDelegate {
46
+ "This API will be removed along with the legacy architecture.")]]
47
+ JsToNativeBridge : public react::ExecutorDelegate {
48
48
  public:
49
49
  JsToNativeBridge(
50
50
  std::shared_ptr<ModuleRegistry> registry,
@@ -356,7 +356,7 @@ NativeToJsBridge::getInspectorTargetDelegate() {
356
356
 
357
357
  } // namespace facebook::react
358
358
 
359
- #endif // RCT_FIT_RM_OLD_RUNTIME
359
+ #endif // RCT_REMOVE_LEGACY_ARCH
360
360
 
361
361
  #if _MSC_VER
362
362
  #pragma warning(pop)
@@ -5,13 +5,14 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
+
8
9
  #if _MSC_VER
9
10
  #pragma warning(push)
10
11
  #pragma warning(disable : 4996) // deprecated APIs
11
12
  #endif
12
13
  #include "RAMBundleRegistry.h"
13
14
 
14
- #ifndef RCT_FIT_RM_OLD_RUNTIME
15
+ #ifndef RCT_REMOVE_LEGACY_ARCH
15
16
 
16
17
  #include <folly/String.h>
17
18
 
@@ -74,8 +75,8 @@ JSModulesUnbundle::Module RAMBundleRegistry::getModule(
74
75
  }
75
76
 
76
77
  return {
77
- "seg-" + std::to_string(bundleId) + '_' + module.name,
78
- std::move(module.code),
78
+ .name = "seg-" + std::to_string(bundleId) + '_' + module.name,
79
+ .code = std::move(module.code),
79
80
  };
80
81
  }
81
82
 
@@ -85,7 +86,8 @@ JSModulesUnbundle* RAMBundleRegistry::getBundle(uint32_t bundleId) const {
85
86
 
86
87
  } // namespace facebook::react
87
88
 
88
- #endif // RCT_FIT_RM_OLD_RUNTIME
89
+ #endif // RCT_REMOVE_LEGACY_ARCH
90
+
89
91
  #if _MSC_VER
90
92
  #pragma warning(pop)
91
93
  #endif
@@ -5,6 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
+
8
9
  #if _MSC_VER
9
10
  #pragma warning(push)
10
11
  #pragma warning(disable : 4996) // deprecated APIs
@@ -142,6 +143,7 @@ double StartupLogger::getAppStartupEndTime() {
142
143
  }
143
144
 
144
145
  } // namespace facebook::react::ReactMarker
146
+
145
147
  #if _MSC_VER
146
148
  #pragma warning(pop)
147
149
  #endif
@@ -69,13 +69,13 @@ namespace facebook::react {
69
69
  struct TraceSection {
70
70
  public:
71
71
  template <typename... ConvertsToStringPiece>
72
- explicit TraceSection(
73
- [[maybe_unused]] const char* name,
74
- [[maybe_unused]] ConvertsToStringPiece&&... args) {
72
+ explicit TraceSection([[maybe_unused]] const char *name, [[maybe_unused]] ConvertsToStringPiece &&...args)
73
+ {
75
74
  TRACE_EVENT_BEGIN("react-native", perfetto::DynamicString{name}, args...);
76
75
  }
77
76
 
78
- ~TraceSection() {
77
+ ~TraceSection()
78
+ {
79
79
  TRACE_EVENT_END("react-native");
80
80
  }
81
81
  };
@@ -84,10 +84,10 @@ using TraceSectionUnwrapped = TraceSection;
84
84
  struct ConcreteTraceSection {
85
85
  public:
86
86
  template <typename... ConvertsToStringPiece>
87
- explicit ConcreteTraceSection(
88
- const char* name,
89
- ConvertsToStringPiece&&... args)
90
- : m_section(TRACE_TAG_REACT_CXX_BRIDGE, name, args...) {} // [Windows][issue #14819]
87
+ explicit ConcreteTraceSection(const char *name, ConvertsToStringPiece &&...args)
88
+ : m_section(TRACE_TAG_REACT_CXX_BRIDGE, name, args...) // [Windows][issue #14819]
89
+ {
90
+ }
91
91
 
92
92
  private:
93
93
  fbsystrace::FbSystraceSection m_section;
@@ -97,9 +97,9 @@ using TraceSectionUnwrapped = ConcreteTraceSection;
97
97
  struct DummyTraceSection {
98
98
  public:
99
99
  template <typename... ConvertsToStringPiece>
100
- explicit DummyTraceSection(
101
- [[maybe_unused]] const char* name,
102
- [[maybe_unused]] ConvertsToStringPiece&&... args) {}
100
+ explicit DummyTraceSection([[maybe_unused]] const char *name, [[maybe_unused]] ConvertsToStringPiece &&...args)
101
+ {
102
+ }
103
103
  };
104
104
  using TraceSectionUnwrapped = DummyTraceSection;
105
105
  #endif
@@ -110,14 +110,14 @@ using TraceSectionUnwrapped = DummyTraceSection;
110
110
  * In the case of WITH_LOOM_TRACE we don't use the signposts APIs because of the
111
111
  * templated type for TraceSection.
112
112
  */
113
- #if defined(__APPLE__) && OS_LOG_TARGET_HAS_10_15_FEATURES && \
114
- !defined(WITH_LOOM_TRACE)
113
+ #if defined(__APPLE__) && OS_LOG_TARGET_HAS_10_15_FEATURES && !defined(WITH_LOOM_TRACE)
115
114
 
116
115
  namespace systrace {
117
116
 
118
117
  template <typename T, typename = void>
119
118
  struct renderer {
120
- static std::string render(const T& t) {
119
+ static std::string render(const T &t)
120
+ {
121
121
  std::ostringstream oss;
122
122
  oss << t;
123
123
  return oss.str();
@@ -125,19 +125,19 @@ struct renderer {
125
125
  };
126
126
 
127
127
  template <typename T>
128
- static auto render(const T& t)
129
- -> decltype(renderer<T>::render(std::declval<const T&>())) {
128
+ static auto render(const T &t) -> decltype(renderer<T>::render(std::declval<const T &>()))
129
+ {
130
130
  return renderer<T>::render(t);
131
131
  }
132
132
 
133
133
  inline os_log_t instrumentsLogHandle = nullptr;
134
134
 
135
- static inline os_log_t getOrCreateInstrumentsLogHandle() {
135
+ static inline os_log_t getOrCreateInstrumentsLogHandle()
136
+ {
136
137
  static std::once_flag flag{};
137
138
  std::call_once(flag, []() {
138
139
  if (!instrumentsLogHandle) {
139
- instrumentsLogHandle = os_log_create(
140
- "dev.reactnative.instruments", OS_LOG_CATEGORY_DYNAMIC_TRACING);
140
+ instrumentsLogHandle = os_log_create("dev.reactnative.instruments", OS_LOG_CATEGORY_DYNAMIC_TRACING);
141
141
  }
142
142
  });
143
143
  return instrumentsLogHandle;
@@ -148,8 +148,8 @@ static inline os_log_t getOrCreateInstrumentsLogHandle() {
148
148
  struct TraceSection {
149
149
  public:
150
150
  template <typename... ConvertsToStringPiece>
151
- explicit TraceSection(const char* name, ConvertsToStringPiece&&... args)
152
- : systraceSectionUnwrapped_(name, args...) {
151
+ explicit TraceSection(const char *name, ConvertsToStringPiece &&...args) : systraceSectionUnwrapped_(name, args...)
152
+ {
153
153
  os_log_t instrumentsLogHandle = systrace::getOrCreateInstrumentsLogHandle();
154
154
 
155
155
  // If the log isn't enabled, we don't want the performance overhead of the
@@ -168,24 +168,14 @@ struct TraceSection {
168
168
 
169
169
  signpostID_ = os_signpost_id_make_with_pointer(instrumentsLogHandle, this);
170
170
 
171
- os_signpost_interval_begin(
172
- instrumentsLogHandle,
173
- signpostID_,
174
- "Systrace",
175
- "%s begin: %s",
176
- name,
177
- argsString.c_str());
171
+ os_signpost_interval_begin(instrumentsLogHandle, signpostID_, "Systrace", "%s begin: %s", name, argsString.c_str());
178
172
  }
179
173
 
180
- ~TraceSection() {
174
+ ~TraceSection()
175
+ {
181
176
  // We don't need to gate on os_signpost_enabled here because it's already
182
177
  // checked in os_signpost_interval_end.
183
- os_signpost_interval_end(
184
- systrace::instrumentsLogHandle,
185
- signpostID_,
186
- "Systrace",
187
- "%s end",
188
- name_.data());
178
+ os_signpost_interval_end(systrace::instrumentsLogHandle, signpostID_, "Systrace", "%s end", name_.data());
189
179
  }
190
180
 
191
181
  private:
@@ -44,19 +44,23 @@ TEST_P(JSITest, PropNameIDTest) {
44
44
  EXPECT_TRUE(PropNameID::compare(rt, movedQuux, copiedQuux));
45
45
 
46
46
  EXPECT_TRUE(PropNameID::compare(rt, movedQuux, movedQuux));
47
- EXPECT_TRUE(PropNameID::compare(
48
- rt, movedQuux, PropNameID::forAscii(rt, std::string("quux2"))));
49
- EXPECT_FALSE(PropNameID::compare(
50
- rt, movedQuux, PropNameID::forAscii(rt, std::string("foo"))));
47
+ EXPECT_TRUE(
48
+ PropNameID::compare(
49
+ rt, movedQuux, PropNameID::forAscii(rt, std::string("quux2"))));
50
+ EXPECT_FALSE(
51
+ PropNameID::compare(
52
+ rt, movedQuux, PropNameID::forAscii(rt, std::string("foo"))));
51
53
  uint8_t utf8[] = {0xF0, 0x9F, 0x86, 0x97};
52
54
  PropNameID utf8PropNameID = PropNameID::forUtf8(rt, utf8, sizeof(utf8));
53
55
  EXPECT_EQ(
54
56
  utf8PropNameID.utf8(rt), reinterpret_cast<const char*>(u8"\U0001F197"));
55
- EXPECT_TRUE(PropNameID::compare(
56
- rt, utf8PropNameID, PropNameID::forUtf8(rt, utf8, sizeof(utf8))));
57
+ EXPECT_TRUE(
58
+ PropNameID::compare(
59
+ rt, utf8PropNameID, PropNameID::forUtf8(rt, utf8, sizeof(utf8))));
57
60
  PropNameID nonUtf8PropNameID = PropNameID::forUtf8(rt, "meow");
58
- EXPECT_TRUE(PropNameID::compare(
59
- rt, nonUtf8PropNameID, PropNameID::forAscii(rt, "meow")));
61
+ EXPECT_TRUE(
62
+ PropNameID::compare(
63
+ rt, nonUtf8PropNameID, PropNameID::forAscii(rt, "meow")));
60
64
  EXPECT_EQ(nonUtf8PropNameID.utf8(rt), "meow");
61
65
  PropNameID strPropNameID =
62
66
  PropNameID::forString(rt, String::createFromAscii(rt, "meow"));
@@ -149,11 +153,12 @@ TEST_P(JSITest, ObjectTest) {
149
153
  obj.setProperty(rt, "oprop", oprop);
150
154
  obj.setProperty(rt, "aprop", Array(rt, 1));
151
155
 
152
- EXPECT_TRUE(function("function (obj) { return "
153
- "obj.roses == 'red' && "
154
- "obj['violets'] == 'blue' && "
155
- "typeof obj.oprop == 'object' && "
156
- "Array.isArray(obj.aprop); }")
156
+ EXPECT_TRUE(function(
157
+ "function (obj) { return "
158
+ "obj.roses == 'red' && "
159
+ "obj['violets'] == 'blue' && "
160
+ "typeof obj.oprop == 'object' && "
161
+ "Array.isArray(obj.aprop); }")
157
162
  .call(rt, obj)
158
163
  .getBool());
159
164
 
@@ -247,7 +252,7 @@ TEST_P(JSITest, HostObjectTest) {
247
252
  EXPECT_TRUE(cho.getHostObject<ConstantHostObject>(rt).get() != nullptr);
248
253
 
249
254
  struct SameRuntimeHostObject : HostObject {
250
- SameRuntimeHostObject(Runtime& rt) : rt_(rt){};
255
+ SameRuntimeHostObject(Runtime& rt) : rt_(rt) {};
251
256
 
252
257
  Value get(Runtime& rt, const PropNameID& sym) override {
253
258
  EXPECT_EQ(&rt, &rt_);
@@ -731,14 +736,15 @@ TEST_P(JSITest, HostFunctionTest) {
731
736
  EXPECT_TRUE(eval("cons.length == 2").getBool());
732
737
  EXPECT_TRUE(eval("cons instanceof Function").getBool());
733
738
 
734
- EXPECT_TRUE(eval("(function() {"
735
- " try {"
736
- " cons('fail'); return false;"
737
- " } catch (e) {"
738
- " return ((e instanceof Error) &&"
739
- " (e.message == 'Exception in HostFunction: ' +"
740
- " 'expected 2 args'));"
741
- " }})()")
739
+ EXPECT_TRUE(eval(
740
+ "(function() {"
741
+ " try {"
742
+ " cons('fail'); return false;"
743
+ " } catch (e) {"
744
+ " return ((e instanceof Error) &&"
745
+ " (e.message == 'Exception in HostFunction: ' +"
746
+ " 'expected 2 args'));"
747
+ " }})()")
742
748
  .getBool());
743
749
 
744
750
  Function coolify = Function::createFromHostFunction(
@@ -755,10 +761,11 @@ TEST_P(JSITest, HostFunctionTest) {
755
761
  EXPECT_TRUE(eval("coolify.name == 'coolify'").getBool());
756
762
  EXPECT_TRUE(eval("coolify.length == 0").getBool());
757
763
  EXPECT_TRUE(eval("coolify.bind('R&M')() == 'R&M is cool'").getBool());
758
- EXPECT_TRUE(eval("(function() {"
759
- " var s = coolify.bind(function(){})();"
760
- " return s.lastIndexOf(' is cool') == (s.length - 8);"
761
- "})()")
764
+ EXPECT_TRUE(eval(
765
+ "(function() {"
766
+ " var s = coolify.bind(function(){})();"
767
+ " return s.lastIndexOf(' is cool') == (s.length - 8);"
768
+ "})()")
762
769
  .getBool());
763
770
 
764
771
  Function lookAtMe = Function::createFromHostFunction(
@@ -887,14 +894,15 @@ TEST_P(JSITest, ValueTest) {
887
894
  uint8_t utf8[] = "[null, 2, \"c\", \"emoji: \xf0\x9f\x86\x97\", {}]";
888
895
 
889
896
  EXPECT_TRUE(
890
- function("function (arr) { return "
891
- "Array.isArray(arr) && "
892
- "arr.length == 5 && "
893
- "arr[0] === null && "
894
- "arr[1] == 2 && "
895
- "arr[2] == 'c' && "
896
- "arr[3] == 'emoji: \\uD83C\\uDD97' && "
897
- "typeof arr[4] == 'object'; }")
897
+ function(
898
+ "function (arr) { return "
899
+ "Array.isArray(arr) && "
900
+ "arr.length == 5 && "
901
+ "arr[0] === null && "
902
+ "arr[1] == 2 && "
903
+ "arr[2] == 'c' && "
904
+ "arr[3] == 'emoji: \\uD83C\\uDD97' && "
905
+ "typeof arr[4] == 'object'; }")
898
906
  .call(rt, Value::createFromJsonUtf8(rt, utf8, sizeof(utf8) - 1))
899
907
  .getBool());
900
908
 
@@ -936,14 +944,16 @@ TEST_P(JSITest, EqualsTest) {
936
944
  EXPECT_TRUE(Value::strictEquals(rt, nullptr, nullptr));
937
945
  EXPECT_TRUE(Value::strictEquals(rt, Value::undefined(), Value()));
938
946
  EXPECT_TRUE(Value::strictEquals(rt, rt.global(), Value(rt.global())));
939
- EXPECT_FALSE(Value::strictEquals(
940
- rt,
941
- std::numeric_limits<double>::quiet_NaN(),
942
- std::numeric_limits<double>::quiet_NaN()));
943
- EXPECT_FALSE(Value::strictEquals(
944
- rt,
945
- std::numeric_limits<double>::signaling_NaN(),
946
- std::numeric_limits<double>::signaling_NaN()));
947
+ EXPECT_FALSE(
948
+ Value::strictEquals(
949
+ rt,
950
+ std::numeric_limits<double>::quiet_NaN(),
951
+ std::numeric_limits<double>::quiet_NaN()));
952
+ EXPECT_FALSE(
953
+ Value::strictEquals(
954
+ rt,
955
+ std::numeric_limits<double>::signaling_NaN(),
956
+ std::numeric_limits<double>::signaling_NaN()));
947
957
  EXPECT_TRUE(Value::strictEquals(rt, +0.0, -0.0));
948
958
  EXPECT_TRUE(Value::strictEquals(rt, -0.0, +0.0));
949
959
 
@@ -1089,8 +1099,9 @@ TEST_P(JSITest, JSErrorDoesNotInfinitelyRecurse) {
1089
1099
  return rt.global().getPropertyAsObject(rt, "NotAProperty");
1090
1100
  };
1091
1101
  EXPECT_EQ(
1092
- function("function (f) { try { f(); return 'undefined'; }"
1093
- "catch (e) { return typeof e; } }")
1102
+ function(
1103
+ "function (f) { try { f(); return 'undefined'; }"
1104
+ "catch (e) { return typeof e; } }")
1094
1105
  .call(
1095
1106
  rt,
1096
1107
  Function::createFromHostFunction(
@@ -1330,18 +1341,21 @@ TEST_P(JSITest, SymbolTest) {
1330
1341
  EXPECT_EQ(eval("Symbol('sym')").getSymbol(rt).toString(rt), "Symbol(sym)");
1331
1342
 
1332
1343
  // EqualsTest
1333
- EXPECT_FALSE(Symbol::strictEquals(
1334
- rt,
1335
- eval("Symbol('a')").getSymbol(rt),
1336
- eval("Symbol('a')").getSymbol(rt)));
1337
- EXPECT_TRUE(Symbol::strictEquals(
1338
- rt,
1339
- eval("Symbol.for('a')").getSymbol(rt),
1340
- eval("Symbol.for('a')").getSymbol(rt)));
1344
+ EXPECT_FALSE(
1345
+ Symbol::strictEquals(
1346
+ rt,
1347
+ eval("Symbol('a')").getSymbol(rt),
1348
+ eval("Symbol('a')").getSymbol(rt)));
1349
+ EXPECT_TRUE(
1350
+ Symbol::strictEquals(
1351
+ rt,
1352
+ eval("Symbol.for('a')").getSymbol(rt),
1353
+ eval("Symbol.for('a')").getSymbol(rt)));
1341
1354
  EXPECT_FALSE(
1342
1355
  Value::strictEquals(rt, eval("Symbol('a')"), eval("Symbol('a')")));
1343
- EXPECT_TRUE(Value::strictEquals(
1344
- rt, eval("Symbol.for('a')"), eval("Symbol.for('a')")));
1356
+ EXPECT_TRUE(
1357
+ Value::strictEquals(
1358
+ rt, eval("Symbol.for('a')"), eval("Symbol.for('a')")));
1345
1359
  EXPECT_FALSE(Value::strictEquals(rt, eval("Symbol('a')"), eval("'a'")));
1346
1360
  }
1347
1361
 
@@ -1352,13 +1366,15 @@ TEST_P(JSITest, JSErrorTest) {
1352
1366
  // Getting message property can throw
1353
1367
 
1354
1368
  EXPECT_THROW(
1355
- eval("var GetMessageThrows = {get message() { throw Error('ex'); }};"
1356
- "throw GetMessageThrows;"),
1369
+ eval(
1370
+ "var GetMessageThrows = {get message() { throw Error('ex'); }};"
1371
+ "throw GetMessageThrows;"),
1357
1372
  JSIException);
1358
1373
 
1359
1374
  EXPECT_THROW(
1360
- eval("var GetMessageThrows = {get message() { throw GetMessageThrows; }};"
1361
- "throw GetMessageThrows;"),
1375
+ eval(
1376
+ "var GetMessageThrows = {get message() { throw GetMessageThrows; }};"
1377
+ "throw GetMessageThrows;"),
1362
1378
  JSIException);
1363
1379
 
1364
1380
  // Converting exception message to String can throw
@@ -1381,18 +1397,20 @@ TEST_P(JSITest, JSErrorTest) {
1381
1397
  JSIException);
1382
1398
 
1383
1399
  EXPECT_THROW(
1384
- eval("var e = Error();"
1385
- "String = function() { throw Error('ctor'); };"
1386
- "throw e;"),
1400
+ eval(
1401
+ "var e = Error();"
1402
+ "String = function() { throw Error('ctor'); };"
1403
+ "throw e;"),
1387
1404
  JSIException);
1388
1405
 
1389
1406
  // Converting an exception message to String can return a non-String
1390
1407
 
1391
1408
  EXPECT_THROW(
1392
- eval("String = function() { return 42; };"
1393
- "var e = Error();"
1394
- "e.message = 17;"
1395
- "throw e;"),
1409
+ eval(
1410
+ "String = function() { return 42; };"
1411
+ "var e = Error();"
1412
+ "e.message = 17;"
1413
+ "throw e;"),
1396
1414
  JSIException);
1397
1415
 
1398
1416
  // Exception can be non-Object
@@ -1404,8 +1422,9 @@ TEST_P(JSITest, JSErrorTest) {
1404
1422
  // Converting exception with no message or stack property to String can throw
1405
1423
 
1406
1424
  EXPECT_THROW(
1407
- eval("var e = {toString() { throw new Error('errstr'); }};"
1408
- "throw e;"),
1425
+ eval(
1426
+ "var e = {toString() { throw new Error('errstr'); }};"
1427
+ "throw e;"),
1409
1428
  JSIException);
1410
1429
  }
1411
1430