react-native-windows 0.69.21 → 0.69.22

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.
@@ -5,6 +5,7 @@
5
5
  #include "ReactInstanceWin.h"
6
6
 
7
7
  #include <winrt/Windows.Storage.h>
8
+ #include <csignal>
8
9
 
9
10
  #include <WerApi.h>
10
11
 
@@ -14,7 +15,7 @@ namespace Mso::React {
14
15
  // That should be saved so that if needed it can be called after the new unhandled exception has finished executing.
15
16
  // This allows the Windows Error Reporting system to process the error and upload the data for processing.
16
17
  static LPTOP_LEVEL_EXCEPTION_FILTER g_previousExceptionFilter = nullptr;
17
-
18
+ static _crt_signal_t g_previousSignalHandler = SIG_ERR;
18
19
  static std::wstring g_logFileName;
19
20
  static bool g_WERExceptionFilterWasCalled{false}; // Prevent recursion in the custom handler
20
21
 
@@ -29,9 +30,18 @@ extern "C" LONG WINAPI CustomWERExceptionFilter(LPEXCEPTION_POINTERS const excep
29
30
 
30
31
  CrashManager::OnUnhandledException();
31
32
 
33
+ if (exceptionPointers == nullptr) {
34
+ return EXCEPTION_EXECUTE_HANDLER;
35
+ }
36
+
32
37
  return g_previousExceptionFilter(exceptionPointers);
33
38
  }
34
39
 
40
+ void __cdecl on_sigabrt(int signum) {
41
+ CustomWERExceptionFilter(nullptr);
42
+ signal(signum, SIG_DFL);
43
+ }
44
+
35
45
  void InternalRegisterCustomHandler() noexcept {
36
46
  // Do this now because by the time we catch the exception we may be in OOM
37
47
  #ifndef CORE_ABI // win32 vs uwp file permissions
@@ -47,6 +57,8 @@ void InternalRegisterCustomHandler() noexcept {
47
57
  VerifySucceededElseCrash(::WerRegisterFile(g_logFileName.c_str(), WerRegFileTypeOther, WER_FILE_ANONYMOUS_DATA));
48
58
 
49
59
  g_previousExceptionFilter = ::SetUnhandledExceptionFilter(CustomWERExceptionFilter);
60
+
61
+ g_previousSignalHandler = signal(SIGABRT, &on_sigabrt);
50
62
  }
51
63
 
52
64
  void InternalUnregisterCustomHandler() noexcept {
@@ -56,6 +68,10 @@ void InternalUnregisterCustomHandler() noexcept {
56
68
  ::SetUnhandledExceptionFilter(g_previousExceptionFilter);
57
69
  g_previousExceptionFilter = nullptr;
58
70
  }
71
+
72
+ if (g_previousSignalHandler != SIG_ERR) {
73
+ signal(SIGABRT, g_previousSignalHandler);
74
+ }
59
75
  }
60
76
 
61
77
  /*static*/ void CrashManager::OnUnhandledException() noexcept {
@@ -426,6 +426,7 @@ void ReactInstanceWin::Initialize() noexcept {
426
426
 
427
427
  devSettings->waitingForDebuggerCallback = GetWaitingForDebuggerCallback();
428
428
  devSettings->debuggerAttachCallback = GetDebuggerAttachCallback();
429
+ devSettings->enableDefaultCrashHandler = m_options.EnableDefaultCrashHandler();
429
430
 
430
431
  #ifndef CORE_ABI
431
432
  devSettings->showDevMenuCallback = [weakThis]() noexcept {
@@ -10,11 +10,11 @@
10
10
  -->
11
11
  <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
12
12
  <PropertyGroup>
13
- <ReactNativeWindowsVersion>0.69.21</ReactNativeWindowsVersion>
13
+ <ReactNativeWindowsVersion>0.69.22</ReactNativeWindowsVersion>
14
14
  <ReactNativeWindowsMajor>0</ReactNativeWindowsMajor>
15
15
  <ReactNativeWindowsMinor>69</ReactNativeWindowsMinor>
16
- <ReactNativeWindowsPatch>21</ReactNativeWindowsPatch>
16
+ <ReactNativeWindowsPatch>22</ReactNativeWindowsPatch>
17
17
  <ReactNativeWindowsCanary>false</ReactNativeWindowsCanary>
18
- <ReactNativeWindowsCommitId>8ef868f2a3a532524b086dfb427ea314ec8988e5</ReactNativeWindowsCommitId>
18
+ <ReactNativeWindowsCommitId>81b0dc4a3af48f114aea78419f7a9605f4d4e39c</ReactNativeWindowsCommitId>
19
19
  </PropertyGroup>
20
20
  </Project>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-windows",
3
- "version": "0.69.21",
3
+ "version": "0.69.22",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",