react-native-windows 0.71.25 → 0.71.27

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 (52) hide show
  1. package/Directory.Build.props +0 -5
  2. package/Microsoft.ReactNative/IReactDispatcher.cpp +0 -4
  3. package/Microsoft.ReactNative/IReactDispatcher.h +0 -1
  4. package/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj +4 -2
  5. package/Microsoft.ReactNative/ReactHost/ReactInstanceWin.cpp +11 -31
  6. package/Microsoft.ReactNative/ReactHost/ReactInstanceWin.h +2 -0
  7. package/Microsoft.ReactNative/Views/DevMenu.cpp +3 -3
  8. package/Microsoft.ReactNative.Cxx/JSI/NodeApiJsiRuntime.cpp +2103 -0
  9. package/Microsoft.ReactNative.Cxx/JSI/NodeApiJsiRuntime.h +73 -0
  10. package/Microsoft.ReactNative.Cxx/Microsoft.ReactNative.Cxx.vcxitems +12 -43
  11. package/Microsoft.ReactNative.Cxx/Microsoft.ReactNative.Cxx.vcxitems.filters +6 -17
  12. package/Microsoft.ReactNative.Managed/packages.lock.json +73 -4
  13. package/PropertySheets/External/Microsoft.ReactNative.Uwp.CSharpApp.targets +1 -1
  14. package/PropertySheets/External/Microsoft.ReactNative.Uwp.CppApp.targets +1 -1
  15. package/PropertySheets/External/Microsoft.ReactNative.WinAppSDK.CSharpApp.targets +1 -1
  16. package/PropertySheets/Generated/PackageVersion.g.props +3 -3
  17. package/PropertySheets/JSEngine.props +4 -4
  18. package/PropertySheets/React.Cpp.props +0 -1
  19. package/PropertySheets/Warnings.props +0 -6
  20. package/ReactCommon/ReactCommon.vcxproj +1 -53
  21. package/Scripts/Tfs/Layout-MSRN-Headers.ps1 +0 -36
  22. package/Shared/DevSupportManager.cpp +9 -2
  23. package/Shared/DevSupportManager.h +6 -2
  24. package/Shared/HermesRuntimeHolder.cpp +84 -344
  25. package/Shared/HermesRuntimeHolder.h +21 -32
  26. package/Shared/HermesSamplingProfiler.cpp +14 -66
  27. package/Shared/HermesSamplingProfiler.h +3 -5
  28. package/Shared/HermesShim.cpp +118 -0
  29. package/Shared/HermesShim.h +21 -0
  30. package/Shared/InspectorPackagerConnection.cpp +108 -62
  31. package/Shared/InspectorPackagerConnection.h +21 -9
  32. package/Shared/JSI/NapiJsiV8RuntimeHolder.cpp +209 -0
  33. package/Shared/JSI/NapiJsiV8RuntimeHolder.h +44 -0
  34. package/Shared/JSI/RuntimeHolder.h +2 -2
  35. package/Shared/JSI/ScriptStore.h +20 -18
  36. package/Shared/Modules/HttpModule.cpp +10 -23
  37. package/Shared/Modules/HttpModule.h +0 -1
  38. package/Shared/Networking/DefaultBlobResource.cpp +6 -1
  39. package/Shared/Networking/WinRTHttpResource.cpp +9 -0
  40. package/Shared/OInstance.cpp +48 -52
  41. package/Shared/Shared.vcxitems +8 -19
  42. package/Shared/Shared.vcxitems.filters +30 -23
  43. package/Shared/V8JSIRuntimeHolder.cpp +70 -0
  44. package/Shared/V8JSIRuntimeHolder.h +53 -0
  45. package/package.json +2 -2
  46. package/template/cs-app-WinAppSDK/proj/ExperimentalFeatures.props +1 -1
  47. package/Microsoft.ReactNative.Cxx/JSI/NodeApiJsiLoader.cpp +0 -16
  48. package/ReactCommon/cgmanifest.json +0 -15
  49. package/Shared/JSI/V8RuntimeHolder.cpp +0 -260
  50. package/Shared/JSI/V8RuntimeHolder.h +0 -37
  51. package/Shared/SafeLoadLibrary.cpp +0 -41
  52. package/Shared/SafeLoadLibrary.h +0 -15
@@ -1,37 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT License.
3
-
4
- #pragma once
5
-
6
- #include "RuntimeHolder.h"
7
- #include "ScriptStore.h"
8
-
9
- #include <cxxreact/MessageQueueThread.h>
10
-
11
- namespace Microsoft::ReactNative {
12
-
13
- class V8RuntimeHolder : public Microsoft::JSI::RuntimeHolderLazyInit {
14
- public: // RuntimeHolderLazyInit implementation.
15
- std::shared_ptr<facebook::jsi::Runtime> getRuntime() noexcept override;
16
- facebook::react::JSIEngineOverride getRuntimeType() noexcept override;
17
-
18
- V8RuntimeHolder(
19
- std::shared_ptr<facebook::react::DevSettings> devSettings,
20
- std::shared_ptr<facebook::react::MessageQueueThread> jsQueue,
21
- std::shared_ptr<facebook::jsi::PreparedScriptStore> preparedScriptStore,
22
- bool enableMultiThreadingSupport) noexcept;
23
-
24
- private:
25
- void initRuntime() noexcept;
26
-
27
- private:
28
- std::shared_ptr<facebook::jsi::Runtime> m_jsiRuntime;
29
- std::once_flag m_onceFlag{};
30
- std::thread::id m_ownThreadId{};
31
- std::weak_ptr<facebook::react::DevSettings> m_weakDevSettings;
32
- std::shared_ptr<facebook::react::MessageQueueThread> m_jsQueue;
33
- std::shared_ptr<facebook::jsi::PreparedScriptStore> m_preparedScriptStore;
34
- bool m_enableMultiThreadingSupport;
35
- };
36
-
37
- } // namespace Microsoft::ReactNative
@@ -1,41 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT License.
3
-
4
- #include "SafeLoadLibrary.h"
5
-
6
- namespace Microsoft::ReactNative {
7
-
8
- // Unsafe calls to LoadLibrary/LoadLibraryEx.
9
- // The default behavior of LoadLibrary, or LoadLibraryEx without flags, is to try and find the dependency by iterating
10
- // through a search order. This search order contains the current working directory. In the classic attack, a malicious
11
- // DLL is dropped in the likely - controllable current working directory. The malicious DLL has the same name as a
12
- // missing dependency or dependency that is not in the same directory as the executable. When the call to LoadLibrary
13
- // is reached, the malicious DLL is loaded preferentially, and code execution occurs.
14
- //
15
- // The SafeLoadLibrary is the preferred ways to manually load dependencies.
16
- // The API does not search the current working directory when resolving dependencies.
17
- // The implementation is "borrowed" from Office MsoSafeLoadLibrary.
18
-
19
- /**
20
- List of new flags that control where to search for DLLs. Requires KB2533623.
21
- */
22
- const DWORD SafeLoadLibraryFlags = LOAD_LIBRARY_SEARCH_APPLICATION_DIR | LOAD_LIBRARY_SEARCH_DEFAULT_DIRS |
23
- LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR | LOAD_LIBRARY_SEARCH_SYSTEM32 | LOAD_LIBRARY_SEARCH_USER_DIRS;
24
-
25
- HMODULE SafeLoadLibrary(const wchar_t *wzFileName, HANDLE hFile, DWORD dwFlags) noexcept {
26
- // When calling LoadLibrary, OR in LOAD_LIBRARY_SEARCH_DEFAULT_DIRS which enables all of the
27
- // safe behaviors. Note that this flag is not compatible with LOAD_WITH_ALTERED_SEARCH_PATH.
28
- HMODULE module =
29
- LoadLibraryExW(wzFileName, hFile, (dwFlags | LOAD_LIBRARY_SEARCH_DEFAULT_DIRS) & ~LOAD_WITH_ALTERED_SEARCH_PATH);
30
- if (module == nullptr && GetLastError() == ERROR_INVALID_PARAMETER) {
31
- // Could have failed with actual bad parameters or an unpatched OS without KB2533623.
32
- if (GetProcAddress(GetModuleHandleW(L"kernel32.dll"), "AddDllDirectory") == nullptr) {
33
- // Unpatched OS, remove all new flags.
34
- module = LoadLibraryExW(wzFileName, hFile, dwFlags & ~SafeLoadLibraryFlags);
35
- }
36
- }
37
-
38
- return module;
39
- }
40
-
41
- } // namespace Microsoft::ReactNative
@@ -1,15 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT License.
3
-
4
- #ifndef WIN32_LEAN_AND_MEAN
5
- #define WIN32_LEAN_AND_MEAN
6
- #endif
7
-
8
- #include <windows.h>
9
-
10
- namespace Microsoft::ReactNative {
11
-
12
- // Safe LoadLibraryEx wrapper that must be used instead of LoadLibrary.
13
- extern HMODULE SafeLoadLibrary(const wchar_t *wzFileName, HANDLE hFile = nullptr, DWORD dwFlags = 0) noexcept;
14
-
15
- } // namespace Microsoft::ReactNative