Skip to content

Commit

Permalink
Fix calls to std::mutex::lock (#14223)
Browse files Browse the repository at this point in the history
* Fix calls to std::mutex::lock

* Change files
  • Loading branch information
vmoroz authored Dec 21, 2024
1 parent 57a42b1 commit 12a642f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "prerelease",
"comment": "Fix calls to std::mutex::lock",
"packageName": "react-native-windows",
"email": "[email protected]",
"dependentChangeType": "patch"
}
6 changes: 6 additions & 0 deletions vnext/PropertySheets/React.Cpp.props
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,12 @@
<PreprocessorDefinitions Condition="'$(UseV8)'=='true'">USE_V8;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions Condition="'$(UseFabric)'=='true'">USE_FABRIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>JSI_VERSION=11;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<!--
To address the crash on the first call to std::mutex::lock.
See: https://github.com/microsoft/STL/wiki/Changelog#vs-2022-1710
https://stackoverflow.com/questions/78598141/first-stdmutexlock-crashes-in-application-built-with-latest-visual-studio
-->
<PreprocessorDefinitions>_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
</ItemDefinitionGroup>

Expand Down

0 comments on commit 12a642f

Please sign in to comment.