Skip to content

Commit 10d6a56

Browse files
authored
[0.81] Release : Update JSI to version 20 (#15074)
* Bump JSI to use latest version 20 * Change files * fixed countime constuctor declaration to match upstream shared_ptr runtime * update runtime_ to a shared pointer
1 parent 8d08452 commit 10d6a56

File tree

6 files changed

+16
-9
lines changed

6 files changed

+16
-9
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "prerelease",
3+
"comment": "Bump JSI to use latest version 20",
4+
"packageName": "react-native-windows",
5+
"email": "[email protected]",
6+
"dependentChangeType": "patch"
7+
}

vnext/Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
<FmtVersion>10.1.0</FmtVersion>
2929
<FmtCommitHash>ca2e3685b160617d3d95fcd9e789c4e06ca88</FmtCommitHash>
3030
<!-- Commit hash for https://github.com/microsoft/node-api-jsi code. -->
31-
<NodeApiJsiCommitHash>980cb60d7911237d0f647fc566543ef627adac70</NodeApiJsiCommitHash>
31+
<NodeApiJsiCommitHash>c048668df3dcda7fef33103aac018c92cbdbe043</NodeApiJsiCommitHash>
3232
</PropertyGroup>
3333

3434
<!--

vnext/Microsoft.ReactNative.Cxx/Microsoft.ReactNative.Cxx.vcxitems

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<!-- If your project is using glog, then GLog_IncludeDir could be set to include the actual location of glog -->
1515
<GLog_IncludeDir Condition="'$(GLog_IncludeDir)' == '' AND Exists('$(MSBuildThisFileDirectory)stubs\glog\logging.h')">$(MSBuildThisFileDirectory)stubs</GLog_IncludeDir>
1616

17-
<NodeApiJsiCommitHash>980cb60d7911237d0f647fc566543ef627adac70</NodeApiJsiCommitHash>
17+
<NodeApiJsiCommitHash>c048668df3dcda7fef33103aac018c92cbdbe043</NodeApiJsiCommitHash>
1818
<NodeApiJsiLocal Condition="Exists('$(MSBuildThisFileDirectory)NodeApiJsiRuntime.cpp')">true</NodeApiJsiLocal>
1919
<NodeApiJsiDir Condition="'$(NodeApiJsiDir)' == '' AND '$(NodeApiJsiLocal)' == 'true'">$(MSBuildThisFileDirectory)</NodeApiJsiDir>
2020
<NodeApiJsiDir Condition="'$(NodeApiJsiDir)' == '' AND '$(ReactNativeDir)' != ''">$(ReactNativeDir)\..\..\node_modules\.node-api-jsi\node-api-jsi-$(NodeApiJsiCommitHash)\</NodeApiJsiDir>
@@ -35,7 +35,7 @@
3535
$(NodeApiJsiSrcDir);
3636
%(AdditionalIncludeDirectories)
3737
</AdditionalIncludeDirectories>
38-
<PreprocessorDefinitions>JSI_VERSION=19;%(PreprocessorDefinitions)</PreprocessorDefinitions>
38+
<PreprocessorDefinitions>JSI_VERSION=20;%(PreprocessorDefinitions)</PreprocessorDefinitions>
3939
</ClCompile>
4040
<Midl>
4141
<AdditionalIncludeDirectories>$(MSBuildThisFileDirectory);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

vnext/PropertySheets/React.Cpp.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
<PreprocessorDefinitions Condition="'$(EnableDevServerHBCBundles)'=='true'">ENABLE_DEVSERVER_HBCBUNDLES;%(PreprocessorDefinitions)</PreprocessorDefinitions>
6666
<PreprocessorDefinitions Condition="'$(UseV8)'=='true'">USE_V8;%(PreprocessorDefinitions)</PreprocessorDefinitions>
6767
<PreprocessorDefinitions Condition="'$(UseFabric)'=='true'">USE_FABRIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
68-
<PreprocessorDefinitions>JSI_VERSION=19;%(PreprocessorDefinitions)</PreprocessorDefinitions>
68+
<PreprocessorDefinitions>JSI_VERSION=20;%(PreprocessorDefinitions)</PreprocessorDefinitions>
6969
<!--
7070
To address the crash on the first call to std::mutex::lock.
7171
See: https://github.com/microsoft/STL/wiki/Changelog#vs-2022-1710

vnext/ReactCommon/TEMP_UntilReactCommonUpdate/jsi/jsi/test/testlib.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1173,7 +1173,7 @@ TEST_P(JSITest, DecoratorTest) {
11731173

11741174
class CountRuntime final : public WithRuntimeDecorator<Count> {
11751175
public:
1176-
explicit CountRuntime(std::unique_ptr<Runtime> rt)
1176+
explicit CountRuntime(std::shared_ptr<Runtime> rt)
11771177
: WithRuntimeDecorator<Count>(*rt, count_),
11781178
rt_(std::move(rt)),
11791179
count_(kInit) {}
@@ -1183,7 +1183,7 @@ TEST_P(JSITest, DecoratorTest) {
11831183
}
11841184

11851185
private:
1186-
std::unique_ptr<Runtime> rt_;
1186+
std::shared_ptr<Runtime> rt_;
11871187
Count count_;
11881188
};
11891189

@@ -1222,7 +1222,7 @@ TEST_P(JSITest, MultiDecoratorTest) {
12221222
class MultiRuntime final
12231223
: public WithRuntimeDecorator<std::tuple<Inc, Nest>> {
12241224
public:
1225-
explicit MultiRuntime(std::unique_ptr<Runtime> rt)
1225+
explicit MultiRuntime(std::shared_ptr<Runtime> rt)
12261226
: WithRuntimeDecorator<std::tuple<Inc, Nest>>(*rt, tuple_),
12271227
rt_(std::move(rt)) {}
12281228

@@ -1234,7 +1234,7 @@ TEST_P(JSITest, MultiDecoratorTest) {
12341234
}
12351235

12361236
private:
1237-
std::unique_ptr<Runtime> rt_;
1237+
std::shared_ptr<Runtime> rt_;
12381238
std::tuple<Inc, Nest> tuple_;
12391239
};
12401240

vnext/ReactCommon/cgmanifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"Type": "git",
77
"Git": {
88
"RepositoryUrl": "https://github.com/microsoft/node-api-jsi",
9-
"CommitHash": "980cb60d7911237d0f647fc566543ef627adac70"
9+
"CommitHash": "c048668df3dcda7fef33103aac018c92cbdbe043"
1010
}
1111
},
1212
"DevelopmentDependency": false

0 commit comments

Comments
 (0)