react-native-windows 0.72.26 → 0.72.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.
|
@@ -10,11 +10,11 @@
|
|
|
10
10
|
-->
|
|
11
11
|
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
12
12
|
<PropertyGroup>
|
|
13
|
-
<ReactNativeWindowsVersion>0.72.
|
|
13
|
+
<ReactNativeWindowsVersion>0.72.27</ReactNativeWindowsVersion>
|
|
14
14
|
<ReactNativeWindowsMajor>0</ReactNativeWindowsMajor>
|
|
15
15
|
<ReactNativeWindowsMinor>72</ReactNativeWindowsMinor>
|
|
16
|
-
<ReactNativeWindowsPatch>
|
|
16
|
+
<ReactNativeWindowsPatch>27</ReactNativeWindowsPatch>
|
|
17
17
|
<ReactNativeWindowsCanary>false</ReactNativeWindowsCanary>
|
|
18
|
-
<ReactNativeWindowsCommitId>
|
|
18
|
+
<ReactNativeWindowsCommitId>45cc04e274ff90c0c73b89b74c538e9f869def5f</ReactNativeWindowsCommitId>
|
|
19
19
|
</PropertyGroup>
|
|
20
20
|
</Project>
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
#include <cxxreact/MessageQueueThread.h>
|
|
11
11
|
|
|
12
|
+
#include <strsafe.h>
|
|
12
13
|
#include <cstring>
|
|
13
14
|
#include <limits>
|
|
14
15
|
#include <mutex>
|
|
@@ -698,8 +699,37 @@ void ChakraRuntime::RewriteErrorMessage(JsValueRef jsError) {
|
|
|
698
699
|
JsGetAndClearException(&ignoreJSError);
|
|
699
700
|
} else if (GetValueType(message) == JsValueType::JsString) {
|
|
700
701
|
// JSI unit tests expect V8 or JSC like message for stack overflow.
|
|
701
|
-
|
|
702
|
+
std::wstring_view errorMessage = StringToPointer(message);
|
|
703
|
+
if (errorMessage == L"Out of stack space") {
|
|
702
704
|
SetProperty(jsError, m_propertyId.message, PointerToString(L"RangeError : Maximum call stack size exceeded"));
|
|
705
|
+
} else if (errorMessage == L"Syntax error") {
|
|
706
|
+
JsValueRef result;
|
|
707
|
+
JsPropertyIdRef property;
|
|
708
|
+
|
|
709
|
+
JsGetPropertyIdFromName(L"line", &property);
|
|
710
|
+
if (JsGetProperty(jsError, property, &result) != JsNoError) {
|
|
711
|
+
// If the 'line' property getter throws, clear the exception and ignore it.
|
|
712
|
+
JsValueRef ignoreJSError{JS_INVALID_REFERENCE};
|
|
713
|
+
JsGetAndClearException(&ignoreJSError);
|
|
714
|
+
return;
|
|
715
|
+
}
|
|
716
|
+
|
|
717
|
+
// Line numbers start from zero
|
|
718
|
+
const int32_t line = NumberToInt(result) + 1;
|
|
719
|
+
wchar_t buf[1024] = {};
|
|
720
|
+
|
|
721
|
+
JsGetPropertyIdFromName(L"column", &property);
|
|
722
|
+
if (JsGetProperty(jsError, property, &result) != JsNoError) {
|
|
723
|
+
// If the 'column' property getter throws, clear the exception and ignore it.
|
|
724
|
+
JsValueRef ignoreJSError{JS_INVALID_REFERENCE};
|
|
725
|
+
JsGetAndClearException(&ignoreJSError);
|
|
726
|
+
StringCchPrintf(buf, std::size(buf), L"Syntax error at line %i", line);
|
|
727
|
+
} else {
|
|
728
|
+
const int32_t column = NumberToInt(result);
|
|
729
|
+
StringCchPrintf(buf, std::size(buf), L"Syntax error at line %i column %i", line, column);
|
|
730
|
+
}
|
|
731
|
+
|
|
732
|
+
SetProperty(jsError, m_propertyId.message, PointerToString(buf));
|
|
703
733
|
}
|
|
704
734
|
}
|
|
705
735
|
}
|