react-native-windows 0.72.0-preview.2 → 0.72.0-preview.4
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.
- package/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj +1 -1
- package/Microsoft.ReactNative.Managed/Microsoft.ReactNative.Managed.csproj +1 -1
- package/Microsoft.ReactNative.Managed/packages.lock.json +54 -11
- package/PropertySheets/External/Microsoft.ReactNative.WindowsSdk.Default.props +2 -2
- package/PropertySheets/Generated/PackageVersion.g.props +2 -2
- package/PropertySheets/JSEngine.props +1 -1
- package/PropertySheets/NuGet.Cpp.props +1 -1
- package/PropertySheets/WinUI.props +1 -1
- package/Scripts/Microsoft.ReactNative.Managed.nuspec +1 -1
- package/Scripts/rnw-dependencies.ps1 +1 -1
- package/Shared/JSI/NapiJsiV8RuntimeHolder.cpp +58 -40
- package/Shared/JSI/NapiJsiV8RuntimeHolder.h +0 -8
- package/package.json +2 -2
- package/template/cpp-lib/proj/MyLib.vcxproj +1 -1
- package/template/cs-lib/proj/MyLib.csproj +1 -1
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
<ApplicationType>Windows Store</ApplicationType>
|
|
15
15
|
<ApplicationTypeRevision>10.0</ApplicationTypeRevision>
|
|
16
16
|
<!-- Overriding for WinUI3 compatibility. See property UseWinUI3. -->
|
|
17
|
-
<WindowsTargetPlatformMinVersion>10.0.
|
|
17
|
+
<WindowsTargetPlatformMinVersion>10.0.17763.0</WindowsTargetPlatformMinVersion>
|
|
18
18
|
<CppWinRTNamespaceMergeDepth>
|
|
19
19
|
</CppWinRTNamespaceMergeDepth>
|
|
20
20
|
<CppWinRTLibs>true</CppWinRTLibs>
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
<GenerateProjectSpecificOutputFolder>false</GenerateProjectSpecificOutputFolder>
|
|
15
15
|
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
|
|
16
16
|
<TargetPlatformVersion Condition=" '$(TargetPlatformVersion)' == '' ">10.0.19041.0</TargetPlatformVersion>
|
|
17
|
-
<TargetPlatformMinVersion>10.0.
|
|
17
|
+
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
|
|
18
18
|
<MinimumVisualStudioVersion>17.0</MinimumVisualStudioVersion>
|
|
19
19
|
<FileAlignment>512</FileAlignment>
|
|
20
20
|
<ProjectTypeGuids>{A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 1,
|
|
3
3
|
"dependencies": {
|
|
4
|
-
"UAP,Version=v10.0.
|
|
4
|
+
"UAP,Version=v10.0.17763": {
|
|
5
5
|
"Microsoft.NETCore.UniversalWindowsPlatform": {
|
|
6
6
|
"type": "Direct",
|
|
7
7
|
"requested": "[6.2.9, )",
|
|
@@ -67,8 +67,16 @@
|
|
|
67
67
|
},
|
|
68
68
|
"Microsoft.UI.Xaml": {
|
|
69
69
|
"type": "Transitive",
|
|
70
|
-
"resolved": "2.
|
|
71
|
-
"contentHash": "
|
|
70
|
+
"resolved": "2.8.0",
|
|
71
|
+
"contentHash": "vxdHxTr63s5KVtNddMFpgvjBjUH50z7seq/5jLWmmSuf8poxg+sXrywkofUdE8ZstbpO9y3FL/IXXUcPYbeesA==",
|
|
72
|
+
"dependencies": {
|
|
73
|
+
"Microsoft.Web.WebView2": "1.0.1264.42"
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
"Microsoft.Web.WebView2": {
|
|
77
|
+
"type": "Transitive",
|
|
78
|
+
"resolved": "1.0.1264.42",
|
|
79
|
+
"contentHash": "7OBUTkzQ5VI/3gb0ufi5U4zjuCowAJwQg2li0zXXzqkM+S1kmOlivTy1R4jAW+gY5Vyg510M+qMAESCQUjrfgA=="
|
|
72
80
|
},
|
|
73
81
|
"Microsoft.Windows.SDK.BuildTools": {
|
|
74
82
|
"type": "Transitive",
|
|
@@ -173,7 +181,7 @@
|
|
|
173
181
|
"dependencies": {
|
|
174
182
|
"Common": "[1.0.0, )",
|
|
175
183
|
"Folly": "[1.0.0, )",
|
|
176
|
-
"Microsoft.UI.Xaml": "[2.
|
|
184
|
+
"Microsoft.UI.Xaml": "[2.8.0, )",
|
|
177
185
|
"Microsoft.Windows.SDK.BuildTools": "[10.0.22000.194, )",
|
|
178
186
|
"ReactCommon": "[1.0.0, )",
|
|
179
187
|
"ReactNative.Hermes.Windows": "[0.0.0-2302.1001-19052299, )",
|
|
@@ -188,7 +196,7 @@
|
|
|
188
196
|
}
|
|
189
197
|
}
|
|
190
198
|
},
|
|
191
|
-
"UAP,Version=v10.0.
|
|
199
|
+
"UAP,Version=v10.0.17763/win10-arm": {
|
|
192
200
|
"Microsoft.NETCore.UniversalWindowsPlatform": {
|
|
193
201
|
"type": "Direct",
|
|
194
202
|
"requested": "[6.2.9, )",
|
|
@@ -202,13 +210,18 @@
|
|
|
202
210
|
"runtime.win10-arm.Microsoft.NETCore.UniversalWindowsPlatform": "6.2.9"
|
|
203
211
|
}
|
|
204
212
|
},
|
|
213
|
+
"Microsoft.Web.WebView2": {
|
|
214
|
+
"type": "Transitive",
|
|
215
|
+
"resolved": "1.0.1264.42",
|
|
216
|
+
"contentHash": "7OBUTkzQ5VI/3gb0ufi5U4zjuCowAJwQg2li0zXXzqkM+S1kmOlivTy1R4jAW+gY5Vyg510M+qMAESCQUjrfgA=="
|
|
217
|
+
},
|
|
205
218
|
"runtime.win10-arm.Microsoft.NETCore.UniversalWindowsPlatform": {
|
|
206
219
|
"type": "Transitive",
|
|
207
220
|
"resolved": "6.2.9",
|
|
208
221
|
"contentHash": "/q9U+SqJTVrocU7CHFd1D4ac2jqPc4U8kPy8F147Li3XGf0Ce9v6UKJqf7nskR+XgVi3IVfUJUcjWLVskG5ZKw=="
|
|
209
222
|
}
|
|
210
223
|
},
|
|
211
|
-
"UAP,Version=v10.0.
|
|
224
|
+
"UAP,Version=v10.0.17763/win10-arm-aot": {
|
|
212
225
|
"Microsoft.NETCore.UniversalWindowsPlatform": {
|
|
213
226
|
"type": "Direct",
|
|
214
227
|
"requested": "[6.2.9, )",
|
|
@@ -222,13 +235,18 @@
|
|
|
222
235
|
"runtime.win10-arm-aot.Microsoft.NETCore.UniversalWindowsPlatform": "6.2.9"
|
|
223
236
|
}
|
|
224
237
|
},
|
|
238
|
+
"Microsoft.Web.WebView2": {
|
|
239
|
+
"type": "Transitive",
|
|
240
|
+
"resolved": "1.0.1264.42",
|
|
241
|
+
"contentHash": "7OBUTkzQ5VI/3gb0ufi5U4zjuCowAJwQg2li0zXXzqkM+S1kmOlivTy1R4jAW+gY5Vyg510M+qMAESCQUjrfgA=="
|
|
242
|
+
},
|
|
225
243
|
"runtime.win10-arm-aot.Microsoft.NETCore.UniversalWindowsPlatform": {
|
|
226
244
|
"type": "Transitive",
|
|
227
245
|
"resolved": "6.2.9",
|
|
228
246
|
"contentHash": "tN7AmnRPUuu29nh9ulL/UGMdzayAe/AQNhM7+fQNKuT4jUlxc61Ilf2djKNJ5MvK8wY69KH0Iz9Yy5+95rB+DQ=="
|
|
229
247
|
}
|
|
230
248
|
},
|
|
231
|
-
"UAP,Version=v10.0.
|
|
249
|
+
"UAP,Version=v10.0.17763/win10-arm64-aot": {
|
|
232
250
|
"Microsoft.NETCore.UniversalWindowsPlatform": {
|
|
233
251
|
"type": "Direct",
|
|
234
252
|
"requested": "[6.2.9, )",
|
|
@@ -242,13 +260,18 @@
|
|
|
242
260
|
"runtime.win10-arm64-aot.Microsoft.NETCore.UniversalWindowsPlatform": "6.2.9"
|
|
243
261
|
}
|
|
244
262
|
},
|
|
263
|
+
"Microsoft.Web.WebView2": {
|
|
264
|
+
"type": "Transitive",
|
|
265
|
+
"resolved": "1.0.1264.42",
|
|
266
|
+
"contentHash": "7OBUTkzQ5VI/3gb0ufi5U4zjuCowAJwQg2li0zXXzqkM+S1kmOlivTy1R4jAW+gY5Vyg510M+qMAESCQUjrfgA=="
|
|
267
|
+
},
|
|
245
268
|
"runtime.win10-arm64-aot.Microsoft.NETCore.UniversalWindowsPlatform": {
|
|
246
269
|
"type": "Transitive",
|
|
247
270
|
"resolved": "6.2.9",
|
|
248
271
|
"contentHash": "gupfeyxXmaOyqLps1gGLh4Lzh5Wee6iuKpgZ70l2nmoHtzqCdk9aK4i+03259M6X2r7BXoIjJJml0paXBQY1kw=="
|
|
249
272
|
}
|
|
250
273
|
},
|
|
251
|
-
"UAP,Version=v10.0.
|
|
274
|
+
"UAP,Version=v10.0.17763/win10-x64": {
|
|
252
275
|
"Microsoft.NETCore.UniversalWindowsPlatform": {
|
|
253
276
|
"type": "Direct",
|
|
254
277
|
"requested": "[6.2.9, )",
|
|
@@ -262,13 +285,18 @@
|
|
|
262
285
|
"runtime.win10-x64.Microsoft.NETCore.UniversalWindowsPlatform": "6.2.9"
|
|
263
286
|
}
|
|
264
287
|
},
|
|
288
|
+
"Microsoft.Web.WebView2": {
|
|
289
|
+
"type": "Transitive",
|
|
290
|
+
"resolved": "1.0.1264.42",
|
|
291
|
+
"contentHash": "7OBUTkzQ5VI/3gb0ufi5U4zjuCowAJwQg2li0zXXzqkM+S1kmOlivTy1R4jAW+gY5Vyg510M+qMAESCQUjrfgA=="
|
|
292
|
+
},
|
|
265
293
|
"runtime.win10-x64.Microsoft.NETCore.UniversalWindowsPlatform": {
|
|
266
294
|
"type": "Transitive",
|
|
267
295
|
"resolved": "6.2.9",
|
|
268
296
|
"contentHash": "JjnUToWq2LQfNKtiqld4YYkgUcC3tCQ0RvRKiut0B7AgS+Eo/HnI/viFiH4FoNG7pFvcWoKimLctj06IgJoiyA=="
|
|
269
297
|
}
|
|
270
298
|
},
|
|
271
|
-
"UAP,Version=v10.0.
|
|
299
|
+
"UAP,Version=v10.0.17763/win10-x64-aot": {
|
|
272
300
|
"Microsoft.NETCore.UniversalWindowsPlatform": {
|
|
273
301
|
"type": "Direct",
|
|
274
302
|
"requested": "[6.2.9, )",
|
|
@@ -282,13 +310,18 @@
|
|
|
282
310
|
"runtime.win10-x64-aot.Microsoft.NETCore.UniversalWindowsPlatform": "6.2.9"
|
|
283
311
|
}
|
|
284
312
|
},
|
|
313
|
+
"Microsoft.Web.WebView2": {
|
|
314
|
+
"type": "Transitive",
|
|
315
|
+
"resolved": "1.0.1264.42",
|
|
316
|
+
"contentHash": "7OBUTkzQ5VI/3gb0ufi5U4zjuCowAJwQg2li0zXXzqkM+S1kmOlivTy1R4jAW+gY5Vyg510M+qMAESCQUjrfgA=="
|
|
317
|
+
},
|
|
285
318
|
"runtime.win10-x64-aot.Microsoft.NETCore.UniversalWindowsPlatform": {
|
|
286
319
|
"type": "Transitive",
|
|
287
320
|
"resolved": "6.2.9",
|
|
288
321
|
"contentHash": "XTmgQZIB3JbzwVE0h+GN//VniFM4MmSWjxjtK7g5zypTwtpuj68oulxWqN5R3F19GaUzT+EFdfKXKEWI73/qwQ=="
|
|
289
322
|
}
|
|
290
323
|
},
|
|
291
|
-
"UAP,Version=v10.0.
|
|
324
|
+
"UAP,Version=v10.0.17763/win10-x86": {
|
|
292
325
|
"Microsoft.NETCore.UniversalWindowsPlatform": {
|
|
293
326
|
"type": "Direct",
|
|
294
327
|
"requested": "[6.2.9, )",
|
|
@@ -302,13 +335,18 @@
|
|
|
302
335
|
"runtime.win10-x86.Microsoft.NETCore.UniversalWindowsPlatform": "6.2.9"
|
|
303
336
|
}
|
|
304
337
|
},
|
|
338
|
+
"Microsoft.Web.WebView2": {
|
|
339
|
+
"type": "Transitive",
|
|
340
|
+
"resolved": "1.0.1264.42",
|
|
341
|
+
"contentHash": "7OBUTkzQ5VI/3gb0ufi5U4zjuCowAJwQg2li0zXXzqkM+S1kmOlivTy1R4jAW+gY5Vyg510M+qMAESCQUjrfgA=="
|
|
342
|
+
},
|
|
305
343
|
"runtime.win10-x86.Microsoft.NETCore.UniversalWindowsPlatform": {
|
|
306
344
|
"type": "Transitive",
|
|
307
345
|
"resolved": "6.2.9",
|
|
308
346
|
"contentHash": "BckZHjaqBTSEtvzj0aliq3DQvLOT7C4ei4L8pCgcD3k/MZpECBg8kUsixDanwYtRot+jNXxc6LF5J87cyigGfA=="
|
|
309
347
|
}
|
|
310
348
|
},
|
|
311
|
-
"UAP,Version=v10.0.
|
|
349
|
+
"UAP,Version=v10.0.17763/win10-x86-aot": {
|
|
312
350
|
"Microsoft.NETCore.UniversalWindowsPlatform": {
|
|
313
351
|
"type": "Direct",
|
|
314
352
|
"requested": "[6.2.9, )",
|
|
@@ -322,6 +360,11 @@
|
|
|
322
360
|
"runtime.win10-x86-aot.Microsoft.NETCore.UniversalWindowsPlatform": "6.2.9"
|
|
323
361
|
}
|
|
324
362
|
},
|
|
363
|
+
"Microsoft.Web.WebView2": {
|
|
364
|
+
"type": "Transitive",
|
|
365
|
+
"resolved": "1.0.1264.42",
|
|
366
|
+
"contentHash": "7OBUTkzQ5VI/3gb0ufi5U4zjuCowAJwQg2li0zXXzqkM+S1kmOlivTy1R4jAW+gY5Vyg510M+qMAESCQUjrfgA=="
|
|
367
|
+
},
|
|
325
368
|
"runtime.win10-x86-aot.Microsoft.NETCore.UniversalWindowsPlatform": {
|
|
326
369
|
"type": "Transitive",
|
|
327
370
|
"resolved": "6.2.9",
|
|
@@ -13,14 +13,14 @@
|
|
|
13
13
|
-->
|
|
14
14
|
<PropertyGroup Label="Globals" Condition="'$(MSBuildProjectExtension)' == '.vcxproj'">
|
|
15
15
|
<WindowsTargetPlatformVersion Condition="'$(WindowsTargetPlatformVersion)'=='' Or '$(WindowsTargetPlatformVersion)'=='10.0.0.0'">10.0.19041.0</WindowsTargetPlatformVersion>
|
|
16
|
-
<WindowsTargetPlatformMinVersion Condition="'$(WindowsTargetPlatformMinVersion)'=='' Or '$(WindowsTargetPlatformMinVersion)'=='10.0.0.0'">10.0.
|
|
16
|
+
<WindowsTargetPlatformMinVersion Condition="'$(WindowsTargetPlatformMinVersion)'=='' Or '$(WindowsTargetPlatformMinVersion)'=='10.0.0.0'">10.0.17763.0</WindowsTargetPlatformMinVersion>
|
|
17
17
|
|
|
18
18
|
<WindowsTargetPlatformMinVersion Condition="'$(UseWinUI3)'=='true' And $([MSBuild]::VersionLessThan('$(WindowsTargetPlatformMinVersion)', '10.0.17763.0'))">10.0.17763.0</WindowsTargetPlatformMinVersion>
|
|
19
19
|
</PropertyGroup>
|
|
20
20
|
|
|
21
21
|
<PropertyGroup Label="Globals" Condition="'$(MSBuildProjectExtension)' == '.csproj'">
|
|
22
22
|
<TargetPlatformVersion Condition="'$(TargetPlatformVersion)'==''">10.0.19041.0</TargetPlatformVersion>
|
|
23
|
-
<TargetPlatformMinVersion Condition="'$(TargetPlatformMinVersion)'==''">10.0.
|
|
23
|
+
<TargetPlatformMinVersion Condition="'$(TargetPlatformMinVersion)'==''">10.0.17763.0</TargetPlatformMinVersion>
|
|
24
24
|
|
|
25
25
|
<TargetPlatformMinVersion Condition="'$(UseWinUI3)'=='true' And $([MSBuild]::VersionLessThan('$(TargetPlatformMinVersion)', '10.0.17763.0'))">10.0.17763.0</TargetPlatformMinVersion>
|
|
26
26
|
</PropertyGroup>
|
|
@@ -10,11 +10,11 @@
|
|
|
10
10
|
-->
|
|
11
11
|
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
12
12
|
<PropertyGroup>
|
|
13
|
-
<ReactNativeWindowsVersion>0.72.0-preview.
|
|
13
|
+
<ReactNativeWindowsVersion>0.72.0-preview.4</ReactNativeWindowsVersion>
|
|
14
14
|
<ReactNativeWindowsMajor>0</ReactNativeWindowsMajor>
|
|
15
15
|
<ReactNativeWindowsMinor>72</ReactNativeWindowsMinor>
|
|
16
16
|
<ReactNativeWindowsPatch>0</ReactNativeWindowsPatch>
|
|
17
17
|
<ReactNativeWindowsCanary>false</ReactNativeWindowsCanary>
|
|
18
|
-
<ReactNativeWindowsCommitId>
|
|
18
|
+
<ReactNativeWindowsCommitId>f2076401425338dec2db2d115b886988ac70e57b</ReactNativeWindowsCommitId>
|
|
19
19
|
</PropertyGroup>
|
|
20
20
|
</Project>
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
<EnableDevServerHBCBundles Condition="'$(EnableDevServerHBCBundles)' == ''">false</EnableDevServerHBCBundles>
|
|
25
25
|
|
|
26
26
|
<UseV8 Condition="'$(UseV8)' == ''">false</UseV8>
|
|
27
|
-
<V8Version Condition="'$(V8Version)' == ''">0.71.
|
|
27
|
+
<V8Version Condition="'$(V8Version)' == ''">0.71.3</V8Version>
|
|
28
28
|
<V8PackageName>ReactNative.V8Jsi.Windows</V8PackageName>
|
|
29
29
|
<V8PackageName Condition="'$(V8AppPlatform)' != 'win32'">$(V8PackageName).UWP</V8PackageName>
|
|
30
30
|
</PropertyGroup>
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
<ResolveNuGetPackages>false</ResolveNuGetPackages>
|
|
17
17
|
|
|
18
18
|
<!-- https://github.com/NuGet/Home/issues/10511#issuecomment-778400668 -->
|
|
19
|
-
<AssetTargetFallback>$(AssetTargetFallback);uap10.0.
|
|
19
|
+
<AssetTargetFallback>$(AssetTargetFallback);uap10.0.17763</AssetTargetFallback>
|
|
20
20
|
|
|
21
21
|
<!--
|
|
22
22
|
Avoid Visual Studio error message:
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
<PropertyGroup Label="WinUI2x versioning">
|
|
9
9
|
<!--This value is also used by the CLI, see /packages/@react-native-windows/generate-windows -->
|
|
10
|
-
<WinUI2xVersion Condition="'$(WinUI2xVersion)'==''">2.
|
|
10
|
+
<WinUI2xVersion Condition="'$(WinUI2xVersion)'==''">2.8.0</WinUI2xVersion>
|
|
11
11
|
</PropertyGroup>
|
|
12
12
|
|
|
13
13
|
<PropertyGroup Condition="'$(UseWinUI3)'=='true'">
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
<tags>react react-native react-native-windows native-module microsoft c# csharp</tags>
|
|
16
16
|
<dependencies>
|
|
17
17
|
<group targetFramework="UAP10.0">
|
|
18
|
-
<dependency id="Microsoft.UI.Xaml" version="2.
|
|
18
|
+
<dependency id="Microsoft.UI.Xaml" version="2.8.0" />
|
|
19
19
|
<dependency id="Microsoft.NETCore.UniversalWindowsPlatform" version="6.2.9" />
|
|
20
20
|
<dependency id="Microsoft.ReactNative" version="$version$" />
|
|
21
21
|
<dependency id="Microsoft.ReactNative.Managed.CodeGen" version="$version$" />
|
|
@@ -376,7 +376,7 @@ $requirements = @(
|
|
|
376
376
|
},
|
|
377
377
|
@{
|
|
378
378
|
Id=[CheckId]::WindowsVersion;
|
|
379
|
-
Name = 'Windows version >= 10.0.
|
|
379
|
+
Name = 'Windows version >= 10.0.17763.0';
|
|
380
380
|
Tags = @('appDev');
|
|
381
381
|
Valid = { ($v.Major -eq 10 -and $v.Minor -eq 0 -and $v.Build -ge 16299); }
|
|
382
382
|
},
|
|
@@ -11,57 +11,75 @@ using std::unique_ptr;
|
|
|
11
11
|
|
|
12
12
|
namespace Microsoft::JSI {
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
14
|
+
class NapiTask {
|
|
15
|
+
public:
|
|
16
|
+
NapiTask(void *task, v8_task_run_cb onTaskRun, v8_task_release_cb onTaskRelease)
|
|
17
|
+
: task_(task), onTaskRun_(onTaskRun), onTaskRelease_(onTaskRelease) {}
|
|
18
|
+
|
|
19
|
+
NapiTask(NapiTask &&other)
|
|
20
|
+
: task_(std::exchange(other.task_, nullptr)),
|
|
21
|
+
onTaskRun_(std::exchange(other.onTaskRun_, nullptr)),
|
|
22
|
+
onTaskRelease_(std::exchange(other.onTaskRelease_, nullptr)) {}
|
|
23
|
+
|
|
24
|
+
NapiTask &operator=(NapiTask &&other) {
|
|
25
|
+
if (this != &other) {
|
|
26
|
+
NapiTask taskToDelete(std::move(*this));
|
|
27
|
+
task_ = std::exchange(other.task_, nullptr);
|
|
28
|
+
onTaskRun_ = std::exchange(other.onTaskRun_, nullptr);
|
|
29
|
+
onTaskRelease_ = std::exchange(other.onTaskRelease_, nullptr);
|
|
30
|
+
}
|
|
31
|
+
return *this;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
NapiTask(const NapiTask &other) = delete;
|
|
35
|
+
NapiTask &operator=(const NapiTask &other) = delete;
|
|
29
36
|
|
|
30
37
|
~NapiTask() {
|
|
31
|
-
if (
|
|
32
|
-
|
|
38
|
+
if (task_ != nullptr) {
|
|
39
|
+
onTaskRelease_(task_);
|
|
33
40
|
}
|
|
34
41
|
}
|
|
35
42
|
|
|
36
|
-
void
|
|
37
|
-
|
|
43
|
+
void Run() const {
|
|
44
|
+
if (task_ != nullptr) {
|
|
45
|
+
onTaskRun_(task_);
|
|
46
|
+
}
|
|
38
47
|
}
|
|
39
48
|
|
|
40
49
|
private:
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
napi_finalize m_finalizeCallback;
|
|
45
|
-
void *m_finalizeHint;
|
|
50
|
+
void *task_;
|
|
51
|
+
v8_task_run_cb onTaskRun_;
|
|
52
|
+
v8_task_release_cb onTaskRelease_;
|
|
46
53
|
};
|
|
47
54
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
void *finalizeHint) {
|
|
56
|
-
NapiJsiV8RuntimeHolder *holder;
|
|
57
|
-
auto result = napi_get_instance_data(env, (void **)&holder);
|
|
58
|
-
if (result != napi_status::napi_ok) {
|
|
59
|
-
std::terminate();
|
|
55
|
+
class NapiTaskRunner {
|
|
56
|
+
public:
|
|
57
|
+
NapiTaskRunner(std::shared_ptr<facebook::react::MessageQueueThread> jsQueue) : m_jsQueue(std::move(jsQueue)) {}
|
|
58
|
+
|
|
59
|
+
static v8_task_runner_t Create(std::shared_ptr<facebook::react::MessageQueueThread> jsQueue) {
|
|
60
|
+
NapiTaskRunner *taskRunner = new NapiTaskRunner(std::move(jsQueue));
|
|
61
|
+
return v8_create_task_runner(reinterpret_cast<void *>(taskRunner), &PostTask, &Release);
|
|
60
62
|
}
|
|
61
63
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
64
|
+
private:
|
|
65
|
+
static void __cdecl PostTask(
|
|
66
|
+
void *taskRunner,
|
|
67
|
+
void *task,
|
|
68
|
+
v8_task_run_cb onTaskRun,
|
|
69
|
+
v8_task_release_cb onTaskRelease) {
|
|
70
|
+
auto napiTask = std::make_shared<NapiTask>(task, onTaskRun, onTaskRelease);
|
|
71
|
+
reinterpret_cast<NapiTaskRunner *>(taskRunner)->m_jsQueue->runOnQueue([napiTask = std::move(napiTask)] {
|
|
72
|
+
napiTask->Run();
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
static void __cdecl Release(void *taskRunner) {
|
|
77
|
+
delete reinterpret_cast<NapiTaskRunner *>(taskRunner);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
private:
|
|
81
|
+
std::shared_ptr<facebook::react::MessageQueueThread> m_jsQueue;
|
|
82
|
+
};
|
|
65
83
|
|
|
66
84
|
NapiJsiV8RuntimeHolder::NapiJsiV8RuntimeHolder(
|
|
67
85
|
shared_ptr<DevSettings> devSettings,
|
|
@@ -85,7 +103,7 @@ void NapiJsiV8RuntimeHolder::InitRuntime() noexcept {
|
|
|
85
103
|
settings.flags.enable_inspector = m_useDirectDebugger;
|
|
86
104
|
settings.flags.wait_for_debugger = m_debuggerBreakOnNextLine;
|
|
87
105
|
// TODO: args.debuggerRuntimeName = debuggerRuntimeName_;
|
|
88
|
-
settings.
|
|
106
|
+
settings.foreground_task_runner = NapiTaskRunner::Create(m_jsQueue);
|
|
89
107
|
|
|
90
108
|
napi_ext_script_cache scriptCache = InitScriptCache(std::move(m_preparedScriptStore));
|
|
91
109
|
settings.script_cache = &scriptCache;
|
|
@@ -24,14 +24,6 @@ class NapiJsiV8RuntimeHolder : public Microsoft::JSI::RuntimeHolderLazyInit {
|
|
|
24
24
|
std::unique_ptr<facebook::jsi::PreparedScriptStore> &&preparedScriptStore) noexcept;
|
|
25
25
|
|
|
26
26
|
private:
|
|
27
|
-
static void __cdecl ScheduleTaskCallback(
|
|
28
|
-
napi_env env,
|
|
29
|
-
napi_ext_task_callback taskCb,
|
|
30
|
-
void *taskData,
|
|
31
|
-
uint32_t delayMs,
|
|
32
|
-
napi_finalize finalizeCb,
|
|
33
|
-
void *finalizeHint);
|
|
34
|
-
|
|
35
27
|
void InitRuntime() noexcept;
|
|
36
28
|
napi_ext_script_cache InitScriptCache(
|
|
37
29
|
std::unique_ptr<facebook::jsi::PreparedScriptStore> &&preparedScriptStore) noexcept;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-windows",
|
|
3
|
-
"version": "0.72.0-preview.
|
|
3
|
+
"version": "0.72.0-preview.4",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"@react-native-community/cli": "11.2.0",
|
|
27
27
|
"@react-native-community/cli-platform-android": "11.2.0",
|
|
28
28
|
"@react-native-community/cli-platform-ios": "11.2.0",
|
|
29
|
-
"@react-native-windows/cli": "0.72.0-preview.
|
|
29
|
+
"@react-native-windows/cli": "0.72.0-preview.3",
|
|
30
30
|
"@react-native/assets": "1.0.0",
|
|
31
31
|
"@react-native/assets-registry": "^0.72.0",
|
|
32
32
|
"@react-native/codegen": "^0.72.3",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
<Import Project="$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.WindowsSdk.Default.props" Condition="Exists('$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.WindowsSdk.Default.props')" />
|
|
22
22
|
<PropertyGroup Label="Fallback Windows SDK Versions">
|
|
23
23
|
<WindowsTargetPlatformVersion Condition=" '$(WindowsTargetPlatformVersion)' == '' ">10.0.19041.0</WindowsTargetPlatformVersion>
|
|
24
|
-
<WindowsTargetPlatformMinVersion Condition=" '$(WindowsTargetPlatformMinVersion)' == '' ">10.0.
|
|
24
|
+
<WindowsTargetPlatformMinVersion Condition=" '$(WindowsTargetPlatformMinVersion)' == '' ">10.0.17763.0</WindowsTargetPlatformMinVersion>
|
|
25
25
|
</PropertyGroup>
|
|
26
26
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
|
27
27
|
<ItemGroup Label="ProjectConfigurations">
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
<Import Project="$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.WindowsSdk.Default.props" Condition="Exists('$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.WindowsSdk.Default.props')" />
|
|
26
26
|
<PropertyGroup Label="Fallback Windows SDK Versions">
|
|
27
27
|
<TargetPlatformVersion Condition=" '$(TargetPlatformVersion)' == '' ">10.0.19041.0</TargetPlatformVersion>
|
|
28
|
-
<TargetPlatformMinVersion Condition=" '$(TargetPlatformMinVersion)' == '' ">10.0.
|
|
28
|
+
<TargetPlatformMinVersion Condition=" '$(TargetPlatformMinVersion)' == '' ">10.0.17763.0</TargetPlatformMinVersion>
|
|
29
29
|
</PropertyGroup>
|
|
30
30
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
|
|
31
31
|
<DebugSymbols>true</DebugSymbols>
|