react-native-windows 0.65.4 → 0.65.8
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.
- package/CHANGELOG.json +85 -1
- package/CHANGELOG.md +42 -6
- package/Chakra/Chakra.vcxitems +0 -1
- package/Chakra/Chakra.vcxitems.filters +0 -3
- package/Chakra/ChakraHelpers.cpp +0 -267
- package/Chakra/ChakraInstanceArgs.h +0 -5
- package/Chakra/ChakraPlatform.h +0 -4
- package/Chakra/ChakraTracing.cpp +0 -33
- package/Chakra/ChakraValue.h +0 -4
- package/Chakra/Utf8DebugExtensions.cpp +0 -5
- package/Chakra/Utf8DebugExtensions.h +0 -6
- package/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj +0 -2
- package/Microsoft.ReactNative/Modules/NativeUIManager.cpp +3 -5
- package/Microsoft.ReactNative/ReactRootView.cpp +28 -3
- package/Microsoft.ReactNative/ReactRootView.h +6 -0
- package/Microsoft.ReactNative/Version.rc +1 -1
- package/Microsoft.ReactNative/Views/RootViewManager.cpp +8 -9
- package/PropertySheets/Autolink.props +1 -1
- package/PropertySheets/React.Cpp.props +2 -0
- package/Scripts/OfficeReact.Win32.nuspec +6 -4
- package/Shared/JSI/ChakraApi.cpp +1 -37
- package/Shared/JSI/ChakraApi.h +0 -4
- package/Shared/JSI/ChakraJsiRuntime_edgemode.cpp +1 -5
- package/Shared/JSI/ChakraRuntime.cpp +0 -12
- package/Shared/JSI/ChakraRuntimeFactory.h +0 -2
- package/Shared/OInstance.cpp +1 -14
- package/Shared/Shared.vcxitems +0 -1
- package/Shared/Shared.vcxitems.filters +0 -3
- package/package.json +4 -4
- package/Chakra/ChakraCoreDebugger.h +0 -147
- package/Scripts/Microsoft.ChakraCore.ARM64.nuspec +0 -50
- package/Scripts/Microsoft.ChakraCore.ARM64.targets +0 -15
- package/Shared/JSI/ChakraCoreRuntime.h +0 -59
|
@@ -38,6 +38,11 @@ struct ReactRootView : ReactRootViewT<ReactRootView>, ::Microsoft::ReactNative::
|
|
|
38
38
|
|
|
39
39
|
void ReloadView() noexcept;
|
|
40
40
|
|
|
41
|
+
// Used by RootViewManager
|
|
42
|
+
void AddView(uint32_t index, xaml::UIElement child);
|
|
43
|
+
void RemoveAllChildren();
|
|
44
|
+
void RemoveChildAt(uint32_t index);
|
|
45
|
+
|
|
41
46
|
public: // IXamlRootView
|
|
42
47
|
::Microsoft::ReactNative::XamlView GetXamlView() const noexcept override;
|
|
43
48
|
|
|
@@ -93,6 +98,7 @@ struct ReactRootView : ReactRootViewT<ReactRootView>, ::Microsoft::ReactNative::
|
|
|
93
98
|
// JS created children
|
|
94
99
|
winrt::Grid m_xamlRootView{nullptr};
|
|
95
100
|
|
|
101
|
+
uint32_t RNIndexToXamlIndex(uint32_t index) noexcept;
|
|
96
102
|
void UpdatePerspective();
|
|
97
103
|
void UpdateRootViewInternal() noexcept;
|
|
98
104
|
void ClearLoadingUI() noexcept;
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
#include "RootViewManager.h"
|
|
7
7
|
|
|
8
8
|
#include <IXamlRootView.h>
|
|
9
|
+
#include <ReactRootView.h>
|
|
9
10
|
#include <UI.Xaml.Controls.h>
|
|
10
11
|
|
|
11
12
|
namespace winrt {
|
|
@@ -29,21 +30,19 @@ XamlView RootViewManager::CreateViewCore(int64_t /*tag*/, const winrt::Microsoft
|
|
|
29
30
|
}
|
|
30
31
|
|
|
31
32
|
void RootViewManager::AddView(const XamlView &parent, const XamlView &child, int64_t index) {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
panel.Children().InsertAt(static_cast<uint32_t>(index), child.as<xaml::UIElement>());
|
|
33
|
+
// Goes through RootShadowNode::AddView instead of here
|
|
34
|
+
assert(false);
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
void RootViewManager::RemoveAllChildren(const XamlView &parent) {
|
|
38
|
-
auto panel(parent.as<winrt::
|
|
39
|
-
|
|
40
|
-
panel.Children().Clear();
|
|
38
|
+
auto panel(parent.as<winrt::Microsoft::ReactNative::ReactRootView>());
|
|
39
|
+
winrt::get_self<winrt::Microsoft::ReactNative::implementation::ReactRootView>(panel)->RemoveAllChildren();
|
|
41
40
|
}
|
|
42
41
|
|
|
43
42
|
void RootViewManager::RemoveChildAt(const XamlView &parent, int64_t index) {
|
|
44
|
-
auto panel(parent.as<winrt::
|
|
45
|
-
|
|
46
|
-
|
|
43
|
+
auto panel(parent.as<winrt::Microsoft::ReactNative::ReactRootView>());
|
|
44
|
+
winrt::get_self<winrt::Microsoft::ReactNative::implementation::ReactRootView>(panel)->RemoveChildAt(
|
|
45
|
+
static_cast<uint32_t>(index));
|
|
47
46
|
}
|
|
48
47
|
|
|
49
48
|
void RootViewManager::SetLayoutProps(
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
<RunAutolinkCheck Condition="'$(RunAutolinkCheck)' == ''">true</RunAutolinkCheck>
|
|
10
10
|
<AutolinkCommand Condition="'$(AutolinkCommand)' == ''">npx react-native autolink-windows</AutolinkCommand>
|
|
11
11
|
<AutolinkCommandWorkingDir Condition="'$(AutolinkCommandWorkingDir)' == ''">$([MSBuild]::GetDirectoryNameOfFileAbove($(ProjectDir), 'package.json'))</AutolinkCommandWorkingDir>
|
|
12
|
-
<AutolinkCommandArgs Condition="'$(AutolinkCommandArgs)' == '' And '$(SolutionPath)' != '' And '$(ProjectPath)' != ''">--check --sln "$([MSBuild]::MakeRelative($(AutolinkCommandWorkingDir), $(SolutionPath)))" --proj "$([MSBuild]::MakeRelative($(AutolinkCommandWorkingDir), $(ProjectPath)))"</AutolinkCommandArgs>
|
|
12
|
+
<AutolinkCommandArgs Condition="'$(AutolinkCommandArgs)' == '' And '$(SolutionPath)' != '' And '$(SolutionPath)' != '*Undefined*' And '$(ProjectPath)' != ''">--check --sln "$([MSBuild]::MakeRelative($(AutolinkCommandWorkingDir), $(SolutionPath)))" --proj "$([MSBuild]::MakeRelative($(AutolinkCommandWorkingDir), $(ProjectPath)))"</AutolinkCommandArgs>
|
|
13
13
|
<AutolinkCommandArgs Condition="'$(AutolinkCommandArgs)' == ''">--check</AutolinkCommandArgs>
|
|
14
14
|
</PropertyGroup>
|
|
15
15
|
|
|
@@ -80,6 +80,7 @@
|
|
|
80
80
|
BOOST_NO_TYPEID - Configure boost not to check typeid (not to use RTTI)
|
|
81
81
|
BOOST_SYSTEM_SOURCE - Build boost::system symbols from sources (drop dependency on boost_system.lib).
|
|
82
82
|
GTEST_HAS_RTTI - Let GTest know not to use RTTI
|
|
83
|
+
USE_EDGEMODE_JSRT When using Chakra, enforce System Chakra instead of JS9.
|
|
83
84
|
WIN32_LEAN_AND_MEAN - Reduce the Windows API included surface.
|
|
84
85
|
WINRT_LEAN_AND_MEAN - Disable rarely used cppwinrt templates that impact compile-time/PCH size.
|
|
85
86
|
-->
|
|
@@ -91,6 +92,7 @@
|
|
|
91
92
|
BOOST_NO_TYPEID;
|
|
92
93
|
BOOST_SYSTEM_SOURCE;
|
|
93
94
|
GTEST_HAS_RTTI=0;
|
|
95
|
+
USE_EDGEMODE_JSRT;
|
|
94
96
|
WIN32_LEAN_AND_MEAN;
|
|
95
97
|
%(PreprocessorDefinitions)
|
|
96
98
|
</PreprocessorDefinitions>
|
|
@@ -28,10 +28,12 @@
|
|
|
28
28
|
<file src="$nugetroot$\x64\Release\React.Windows.Desktop\Microsoft.ReactNative.winmd" target="lib\ship\x64"/>
|
|
29
29
|
<file src="$nugetroot$\ARM64\Release\React.Windows.Desktop\Microsoft.ReactNative.winmd" target="lib\ship\ARM64"/>
|
|
30
30
|
|
|
31
|
-
<file src="$nugetroot$\x86\Debug\React.Windows.Desktop.Test.DLL\React.Windows.Desktop.Test.**"
|
|
32
|
-
<file src="$nugetroot$\x64\Debug\React.Windows.Desktop.Test.DLL\React.Windows.Desktop.Test.**"
|
|
33
|
-
<file src="$nugetroot$\
|
|
34
|
-
<file src="$nugetroot$\
|
|
31
|
+
<file src="$nugetroot$\x86\Debug\React.Windows.Desktop.Test.DLL\React.Windows.Desktop.Test.**" target="lib\debug\x86" exclude="**\*.iobj;**\*.ipdb;**\*.exp;**\*.ilk" />
|
|
32
|
+
<file src="$nugetroot$\x64\Debug\React.Windows.Desktop.Test.DLL\React.Windows.Desktop.Test.**" target="lib\debug\x64" exclude="**\*.iobj;**\*.ipdb;**\*.exp;**\*.ilk" />
|
|
33
|
+
<file src="$nugetroot$\ARM64\Debug\React.Windows.Desktop.Test.DLL\React.Windows.Desktop.Test.**" target="lib\debug\ARM64" exclude="**\*.iobj;**\*.ipdb;**\*.exp;**\*.ilk" />
|
|
34
|
+
<file src="$nugetroot$\x86\Release\React.Windows.Desktop.Test.DLL\React.Windows.Desktop.Test.**" target="lib\ship\x86" exclude="**\*.iobj;**\*.ipdb;**\*.exp;**\*.ilk" />
|
|
35
|
+
<file src="$nugetroot$\x64\Release\React.Windows.Desktop.Test.DLL\React.Windows.Desktop.Test.**" target="lib\ship\x64" exclude="**\*.iobj;**\*.ipdb;**\*.exp;**\*.ilk" />
|
|
36
|
+
<file src="$nugetroot$\ARM64\Release\React.Windows.Desktop.Test.DLL\React.Windows.Desktop.Test.**" target="lib\ship\ARM64" exclude="**\*.iobj;**\*.ipdb;**\*.exp;**\*.ilk" />
|
|
35
37
|
|
|
36
38
|
<file src="$nugetroot$\inc\callinvoker\ReactCommon\CallInvoker.h" target="inc\ReactCommon"/>
|
|
37
39
|
<file src="$nugetroot$\inc\runtimeexecutor\ReactCommon\RuntimeExecutor.h" target="inc\ReactCommon"/>
|
package/Shared/JSI/ChakraApi.cpp
CHANGED
|
@@ -144,17 +144,9 @@ ChakraApi::JsRefHolder::~JsRefHolder() noexcept {
|
|
|
144
144
|
JsPropertyIdRef propertyId{JS_INVALID_REFERENCE};
|
|
145
145
|
// We use a #ifdef here because we can avoid a UTF-8 to UTF-16 conversion
|
|
146
146
|
// using ChakraCore's JsCreatePropertyId API.
|
|
147
|
-
#ifdef CHAKRACORE
|
|
148
|
-
if (React::GetRuntimeOptionBool("JSI.ForceSystemChakra")) {
|
|
149
|
-
std::wstring utf16 = Common::Unicode::Utf8ToUtf16(name.data(), name.length());
|
|
150
|
-
ChakraVerifyJsErrorElseThrow(JsGetPropertyIdFromName(utf16.data(), &propertyId));
|
|
151
|
-
} else {
|
|
152
|
-
ChakraVerifyJsErrorElseThrow(JsCreatePropertyId(name.data(), name.length(), &propertyId));
|
|
153
|
-
}
|
|
154
|
-
#else
|
|
155
147
|
std::wstring utf16 = Common::Unicode::Utf8ToUtf16(name.data(), name.length());
|
|
156
148
|
ChakraVerifyJsErrorElseThrow(JsGetPropertyIdFromName(utf16.data(), &propertyId));
|
|
157
|
-
|
|
149
|
+
|
|
158
150
|
return propertyId;
|
|
159
151
|
}
|
|
160
152
|
|
|
@@ -275,18 +267,7 @@ ChakraApi::JsRefHolder::~JsRefHolder() noexcept {
|
|
|
275
267
|
/*static*/ JsValueRef ChakraApi::PointerToString(std::string_view value) {
|
|
276
268
|
ChakraVerifyElseThrow(value.data(), "Cannot convert a nullptr to a JS string.");
|
|
277
269
|
|
|
278
|
-
// ChakraCore API helps to reduce cost of UTF-8 to UTF-16 conversion.
|
|
279
|
-
#ifdef CHAKRACORE
|
|
280
|
-
if (React::GetRuntimeOptionBool("JSI.ForceSystemChakra")) {
|
|
281
|
-
return PointerToString(Common::Unicode::Utf8ToUtf16(value));
|
|
282
|
-
} else {
|
|
283
|
-
JsValueRef result{JS_INVALID_REFERENCE};
|
|
284
|
-
ChakraVerifyJsErrorElseThrow(JsCreateString(value.data(), value.length(), &result));
|
|
285
|
-
return result;
|
|
286
|
-
}
|
|
287
|
-
#else
|
|
288
270
|
return PointerToString(Common::Unicode::Utf8ToUtf16(value));
|
|
289
|
-
#endif
|
|
290
271
|
}
|
|
291
272
|
|
|
292
273
|
/*static*/ std::wstring_view ChakraApi::StringToPointer(JsValueRef string) {
|
|
@@ -300,24 +281,7 @@ ChakraApi::JsRefHolder::~JsRefHolder() noexcept {
|
|
|
300
281
|
ChakraVerifyElseThrow(
|
|
301
282
|
GetValueType(string) == JsString, "Cannot convert a non JS string ChakraObjectRef to a std::string.");
|
|
302
283
|
|
|
303
|
-
// We use a #ifdef here because we can avoid a UTF-8 to UTF-16 conversion
|
|
304
|
-
// using ChakraCore's JsCopyString API.
|
|
305
|
-
#ifdef CHAKRACORE
|
|
306
|
-
if (React::GetRuntimeOptionBool("JSI.ForceSystemChakra")) {
|
|
307
|
-
return Common::Unicode::Utf16ToUtf8(StringToPointer(string));
|
|
308
|
-
} else {
|
|
309
|
-
size_t length{0};
|
|
310
|
-
ChakraVerifyJsErrorElseThrow(JsCopyString(string, nullptr, 0, &length));
|
|
311
|
-
|
|
312
|
-
std::string result(length, 'a');
|
|
313
|
-
ChakraVerifyJsErrorElseThrow(JsCopyString(string, result.data(), result.length(), &length));
|
|
314
|
-
|
|
315
|
-
ChakraVerifyElseThrow(length == result.length(), "Failed to convert a JS string to a std::string.");
|
|
316
|
-
return result;
|
|
317
|
-
}
|
|
318
|
-
#else
|
|
319
284
|
return Common::Unicode::Utf16ToUtf8(StringToPointer(string));
|
|
320
|
-
#endif
|
|
321
285
|
}
|
|
322
286
|
|
|
323
287
|
/*static*/ JsValueRef ChakraApi::ConvertValueToString(JsValueRef value) {
|
package/Shared/JSI/ChakraApi.h
CHANGED
|
@@ -15,7 +15,7 @@ JsStartDebugging();
|
|
|
15
15
|
|
|
16
16
|
namespace Microsoft::JSI {
|
|
17
17
|
|
|
18
|
-
#if defined(USE_EDGEMODE_JSRT)
|
|
18
|
+
#if defined(USE_EDGEMODE_JSRT)
|
|
19
19
|
/*static*/ void ChakraRuntime::initRuntimeVersion() noexcept {}
|
|
20
20
|
#endif
|
|
21
21
|
|
|
@@ -42,11 +42,7 @@ std::unique_ptr<const facebook::jsi::Buffer> SystemChakraRuntime::generatePrepar
|
|
|
42
42
|
const std::wstring scriptUTF16 =
|
|
43
43
|
Microsoft::Common::Unicode::Utf8ToUtf16(reinterpret_cast<const char *>(sourceBuffer.data()), sourceBuffer.size());
|
|
44
44
|
|
|
45
|
-
#ifdef CHAKRACORE
|
|
46
|
-
unsigned int bytecodeSize = 0;
|
|
47
|
-
#else
|
|
48
45
|
unsigned long bytecodeSize = 0;
|
|
49
|
-
#endif
|
|
50
46
|
if (JsSerializeScript(scriptUTF16.c_str(), nullptr, &bytecodeSize) == JsNoError) {
|
|
51
47
|
std::unique_ptr<ByteArrayBuffer> bytecodeBuffer(std::make_unique<ByteArrayBuffer>(bytecodeSize));
|
|
52
48
|
if (JsSerializeScript(scriptUTF16.c_str(), bytecodeBuffer->data(), &bytecodeSize) == JsNoError) {
|
|
@@ -17,14 +17,10 @@
|
|
|
17
17
|
#include <sstream>
|
|
18
18
|
#include <unordered_set>
|
|
19
19
|
|
|
20
|
-
#ifdef CHAKRACORE
|
|
21
|
-
#include <ChakraCore.h>
|
|
22
|
-
#else
|
|
23
20
|
#ifndef USE_EDGEMODE_JSRT
|
|
24
21
|
#define USE_EDGEMODE_JSRT
|
|
25
22
|
#endif
|
|
26
23
|
#include <jsrt.h>
|
|
27
|
-
#endif
|
|
28
24
|
|
|
29
25
|
namespace Microsoft::JSI {
|
|
30
26
|
|
|
@@ -1032,15 +1028,7 @@ std::once_flag ChakraRuntime::s_runtimeVersionInitFlag;
|
|
|
1032
1028
|
uint64_t ChakraRuntime::s_runtimeVersion = 0;
|
|
1033
1029
|
|
|
1034
1030
|
std::unique_ptr<facebook::jsi::Runtime> makeChakraRuntime(ChakraRuntimeArgs &&args) noexcept {
|
|
1035
|
-
#ifdef CHAKRACORE
|
|
1036
|
-
if (React::GetRuntimeOptionBool("JSI.ForceSystemChakra")) {
|
|
1037
|
-
return MakeSystemChakraRuntime(std::move(args));
|
|
1038
|
-
} else {
|
|
1039
|
-
return MakeChakraCoreRuntime(std::move(args));
|
|
1040
|
-
}
|
|
1041
|
-
#else
|
|
1042
1031
|
return MakeSystemChakraRuntime(std::move(args));
|
|
1043
|
-
#endif // CHAKRACORE
|
|
1044
1032
|
}
|
|
1045
1033
|
|
|
1046
1034
|
} // namespace Microsoft::JSI
|
|
@@ -11,7 +11,5 @@ struct ChakraRuntimeArgs;
|
|
|
11
11
|
|
|
12
12
|
std::unique_ptr<facebook::jsi::Runtime> makeChakraRuntime(ChakraRuntimeArgs &&args) noexcept;
|
|
13
13
|
|
|
14
|
-
std::unique_ptr<facebook::jsi::Runtime> MakeChakraCoreRuntime(ChakraRuntimeArgs &&args) noexcept;
|
|
15
|
-
|
|
16
14
|
std::unique_ptr<facebook::jsi::Runtime> MakeSystemChakraRuntime(ChakraRuntimeArgs &&args) noexcept;
|
|
17
15
|
} // namespace Microsoft::JSI
|
package/Shared/OInstance.cpp
CHANGED
|
@@ -380,12 +380,6 @@ InstanceImpl::InstanceImpl(
|
|
|
380
380
|
[[fallthrough]];
|
|
381
381
|
#endif
|
|
382
382
|
}
|
|
383
|
-
case JSIEngineOverride::Chakra:
|
|
384
|
-
// Applies only to ChakraCore-linked binaries.
|
|
385
|
-
Microsoft::React::SetRuntimeOptionBool("JSI.ForceSystemChakra", true);
|
|
386
|
-
m_devSettings->jsiRuntimeHolder =
|
|
387
|
-
std::make_shared<Microsoft::JSI::ChakraRuntimeHolder>(m_devSettings, m_jsThread, nullptr, nullptr);
|
|
388
|
-
break;
|
|
389
383
|
case JSIEngineOverride::V8NodeApi: {
|
|
390
384
|
#if defined(USE_V8)
|
|
391
385
|
std::unique_ptr<facebook::jsi::PreparedScriptStore> preparedScriptStore;
|
|
@@ -413,6 +407,7 @@ InstanceImpl::InstanceImpl(
|
|
|
413
407
|
[[fallthrough]];
|
|
414
408
|
#endif
|
|
415
409
|
}
|
|
410
|
+
case JSIEngineOverride::Chakra:
|
|
416
411
|
case JSIEngineOverride::ChakraCore:
|
|
417
412
|
default: // TODO: Add other engines once supported
|
|
418
413
|
m_devSettings->jsiRuntimeHolder =
|
|
@@ -505,11 +500,7 @@ void InstanceImpl::loadBundleInternal(std::string &&jsBundleRelativePath, bool s
|
|
|
505
500
|
// Otherwise all bundles (User and Platform) are loaded through
|
|
506
501
|
// platformBundles.
|
|
507
502
|
if (PathFileExistsA(fullBundleFilePath.c_str())) {
|
|
508
|
-
#if defined(_CHAKRACORE_H_)
|
|
509
503
|
auto bundleString = FileMappingBigString::fromPath(fullBundleFilePath);
|
|
510
|
-
#else
|
|
511
|
-
auto bundleString = JSBigFileString::fromPath(fullBundleFilePath);
|
|
512
|
-
#endif
|
|
513
504
|
m_innerInstance->loadScriptFromString(std::move(bundleString), std::move(fullBundleFilePath), synchronously);
|
|
514
505
|
}
|
|
515
506
|
|
|
@@ -520,10 +511,6 @@ void InstanceImpl::loadBundleInternal(std::string &&jsBundleRelativePath, bool s
|
|
|
520
511
|
m_innerInstance->loadScriptFromString(std::move(bundleString), jsBundleRelativePath, synchronously);
|
|
521
512
|
#endif
|
|
522
513
|
}
|
|
523
|
-
#if defined(_CHAKRACORE_H_)
|
|
524
|
-
} catch (const facebook::react::ChakraJSException &e) {
|
|
525
|
-
m_devSettings->errorCallback(std::string{e.what()} + "\r\n" + e.getStack());
|
|
526
|
-
#endif
|
|
527
514
|
} catch (const std::exception &e) {
|
|
528
515
|
m_devSettings->errorCallback(e.what());
|
|
529
516
|
} catch (const winrt::hresult_error &hrerr) {
|
package/Shared/Shared.vcxitems
CHANGED
|
@@ -78,7 +78,6 @@
|
|
|
78
78
|
<ClInclude Include="$(MSBuildThisFileDirectory)AsyncStorage\KeyValueStorage.h" />
|
|
79
79
|
<ClInclude Include="$(MSBuildThisFileDirectory)JSI\ByteArrayBuffer.h" />
|
|
80
80
|
<ClInclude Include="$(MSBuildThisFileDirectory)JSI\ChakraApi.h" />
|
|
81
|
-
<ClInclude Include="$(MSBuildThisFileDirectory)JSI\ChakraCoreRuntime.h" />
|
|
82
81
|
<ClInclude Include="$(MSBuildThisFileDirectory)JSI\ChakraRuntime.h" />
|
|
83
82
|
<ClInclude Include="$(MSBuildThisFileDirectory)JSI\ChakraRuntimeArgs.h" />
|
|
84
83
|
<ClInclude Include="$(MSBuildThisFileDirectory)JSI\ChakraRuntimeFactory.h" />
|
|
@@ -366,9 +366,6 @@
|
|
|
366
366
|
<Filter>Header Files\JSI</Filter>
|
|
367
367
|
</ClInclude>
|
|
368
368
|
<ClInclude Include="$(MSBuildThisFileDirectory)..\include\Shared\cdebug.h" />
|
|
369
|
-
<ClInclude Include="$(MSBuildThisFileDirectory)JSI\ChakraCoreRuntime.h">
|
|
370
|
-
<Filter>Header Files\JSI</Filter>
|
|
371
|
-
</ClInclude>
|
|
372
369
|
<ClInclude Include="$(MSBuildThisFileDirectory)InspectorPackagerConnection.h">
|
|
373
370
|
<Filter>Header Files</Filter>
|
|
374
371
|
</ClInclude>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-windows",
|
|
3
|
-
"version": "0.65.
|
|
3
|
+
"version": "0.65.8",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"@react-native-community/cli": "^6.0.0",
|
|
26
26
|
"@react-native-community/cli-platform-android": "^6.0.0",
|
|
27
27
|
"@react-native-community/cli-platform-ios": "^6.0.0",
|
|
28
|
-
"@react-native-windows/cli": "0.65.
|
|
28
|
+
"@react-native-windows/cli": "0.65.3",
|
|
29
29
|
"@react-native/assets": "1.0.0",
|
|
30
30
|
"@react-native/normalize-color": "1.0.0",
|
|
31
31
|
"@react-native/polyfills": "1.0.0",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"ws": "^6.1.4"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
|
-
"@react-native-windows/codegen": "0.65.
|
|
58
|
+
"@react-native-windows/codegen": "0.65.1",
|
|
59
59
|
"@rnw-scripts/eslint-config": "1.1.6",
|
|
60
60
|
"@types/node": "^14.14.22",
|
|
61
61
|
"@types/react": "16.9.11",
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
"react-native": "^0.65.0"
|
|
79
79
|
},
|
|
80
80
|
"beachball": {
|
|
81
|
-
"defaultNpmTag": "
|
|
81
|
+
"defaultNpmTag": "v0.65-stable",
|
|
82
82
|
"gitTags": true,
|
|
83
83
|
"disallowedChangeTypes": [
|
|
84
84
|
"major",
|
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Microsoft Corporation.
|
|
2
|
-
// Licensed under the MIT License.
|
|
3
|
-
#pragma once
|
|
4
|
-
|
|
5
|
-
#include <exception>
|
|
6
|
-
#include <stdexcept>
|
|
7
|
-
|
|
8
|
-
#include <ChakraDebugProtocolHandler.h>
|
|
9
|
-
#include <ChakraDebugService.h>
|
|
10
|
-
|
|
11
|
-
class DebugProtocolHandler {
|
|
12
|
-
private:
|
|
13
|
-
JsDebugProtocolHandler m_protocolHandler{nullptr};
|
|
14
|
-
|
|
15
|
-
public:
|
|
16
|
-
DebugProtocolHandler(JsRuntimeHandle runtime) {
|
|
17
|
-
JsDebugProtocolHandler protocolHandler;
|
|
18
|
-
|
|
19
|
-
JsErrorCode result = JsDebugProtocolHandlerCreate(runtime, &protocolHandler);
|
|
20
|
-
|
|
21
|
-
if (result != JsNoError) {
|
|
22
|
-
throw new std::runtime_error("Unable to create debug protocol handler.");
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
m_protocolHandler = protocolHandler;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
~DebugProtocolHandler() {
|
|
29
|
-
Destroy();
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
JsErrorCode Connect(bool breakOnNextLine, JsDebugProtocolHandlerSendResponseCallback callback, void *callbackState) {
|
|
33
|
-
JsErrorCode result = JsDebugProtocolHandlerConnect(m_protocolHandler, breakOnNextLine, callback, callbackState);
|
|
34
|
-
|
|
35
|
-
return result;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
JsErrorCode Destroy() {
|
|
39
|
-
JsErrorCode result = JsNoError;
|
|
40
|
-
|
|
41
|
-
if (m_protocolHandler != nullptr) {
|
|
42
|
-
result = JsDebugProtocolHandlerDestroy(m_protocolHandler);
|
|
43
|
-
|
|
44
|
-
if (result == JsNoError) {
|
|
45
|
-
m_protocolHandler = nullptr;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
return result;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
JsErrorCode Disconnect() {
|
|
53
|
-
JsErrorCode result = JsDebugProtocolHandlerDisconnect(m_protocolHandler);
|
|
54
|
-
|
|
55
|
-
return result;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
JsDebugProtocolHandler GetHandle() {
|
|
59
|
-
return m_protocolHandler;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
JsErrorCode ProcessCommandQueue() {
|
|
63
|
-
JsErrorCode result = JsDebugProtocolHandlerProcessCommandQueue(m_protocolHandler);
|
|
64
|
-
|
|
65
|
-
return result;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
JsErrorCode SetCommandQueueCallback(JsDebugProtocolHandlerCommandQueueCallback callback, void *callbackState) {
|
|
69
|
-
JsErrorCode result = JsDebugProtocolHandlerSetCommandQueueCallback(m_protocolHandler, callback, callbackState);
|
|
70
|
-
|
|
71
|
-
return result;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
JsErrorCode WaitForDebugger() {
|
|
75
|
-
JsErrorCode result = JsDebugProtocolHandlerWaitForDebugger(m_protocolHandler);
|
|
76
|
-
|
|
77
|
-
return result;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
JsErrorCode GetConsoleObject(JsValueRef *consoleObject) {
|
|
81
|
-
JsErrorCode result = JsDebugProtocolHandlerCreateConsoleObject(m_protocolHandler, consoleObject);
|
|
82
|
-
|
|
83
|
-
return result;
|
|
84
|
-
}
|
|
85
|
-
};
|
|
86
|
-
|
|
87
|
-
class DebugService {
|
|
88
|
-
private:
|
|
89
|
-
JsDebugService m_service{nullptr};
|
|
90
|
-
|
|
91
|
-
public:
|
|
92
|
-
DebugService(JsRuntimeHandle runtime) {
|
|
93
|
-
JsDebugService service;
|
|
94
|
-
|
|
95
|
-
JsErrorCode result = JsDebugServiceCreate(&service);
|
|
96
|
-
|
|
97
|
-
if (result != JsNoError) {
|
|
98
|
-
throw new std::exception("Unable to create debug service.");
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
m_service = service;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
~DebugService() {
|
|
105
|
-
Destroy();
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
JsErrorCode Close() {
|
|
109
|
-
JsErrorCode result = JsDebugServiceClose(m_service);
|
|
110
|
-
|
|
111
|
-
return result;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
JsErrorCode Destroy() {
|
|
115
|
-
JsErrorCode result = JsNoError;
|
|
116
|
-
|
|
117
|
-
if (m_service != nullptr) {
|
|
118
|
-
result = JsDebugServiceDestroy(m_service);
|
|
119
|
-
|
|
120
|
-
if (result == JsNoError) {
|
|
121
|
-
m_service = nullptr;
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
return result;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
JsErrorCode Listen(uint16_t port) {
|
|
129
|
-
JsErrorCode result = JsDebugServiceListen(m_service, port);
|
|
130
|
-
|
|
131
|
-
return result;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
JsErrorCode
|
|
135
|
-
RegisterHandler(std::string const &runtimeName, DebugProtocolHandler &protocolHandler, bool breakOnNextLine) {
|
|
136
|
-
JsErrorCode result =
|
|
137
|
-
JsDebugServiceRegisterHandler(m_service, runtimeName.c_str(), protocolHandler.GetHandle(), breakOnNextLine);
|
|
138
|
-
|
|
139
|
-
return result;
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
JsErrorCode UnregisterHandler(std::string const &runtimeName) {
|
|
143
|
-
JsErrorCode result = JsDebugServiceUnregisterHandler(m_service, runtimeName.c_str());
|
|
144
|
-
|
|
145
|
-
return result;
|
|
146
|
-
}
|
|
147
|
-
};
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
-
|
|
3
|
-
<!--
|
|
4
|
-
Sample usage:
|
|
5
|
-
|
|
6
|
-
nuget pack Microsoft.ChakraCore.ARM64.nuspec `
|
|
7
|
-
-Properties "id=ReactWindows.ChakraCore.ARM64;targetRoot=D:\chakra;repoUrl=https://github.com/microsoft/ChakraCore;repoBranch=master;repoCommit=$(git rev-parse HEAD)" `
|
|
8
|
-
-Version 1.11.20.0
|
|
9
|
-
-->
|
|
10
|
-
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
|
|
11
|
-
<metadata>
|
|
12
|
-
<!-- i.e.: Microsoft.ChakraCore.vc140.ARM64 -->
|
|
13
|
-
<id>$id$</id>
|
|
14
|
-
<version>$version$</version>
|
|
15
|
-
<authors>Microsoft</authors>
|
|
16
|
-
<owners>Chakra Team</owners>
|
|
17
|
-
<licenseUrl>https://github.com/Microsoft/ChakraCore/blob/master/LICENSE.txt</licenseUrl>
|
|
18
|
-
<projectUrl>https://github.com/Microsoft/ChakraCore</projectUrl>
|
|
19
|
-
<repository type="git" url="$repoUrl$" branch="$repoBranch$" commit="$repoCommit$" />
|
|
20
|
-
<requireLicenseAcceptance>false</requireLicenseAcceptance>
|
|
21
|
-
<developmentDependency>true</developmentDependency>
|
|
22
|
-
<description>ChakraCore is the core part of the Chakra Javascript engine that powers Microsoft Edge.</description>
|
|
23
|
-
<releaseNotes>https://github.com/Microsoft/ChakraCore/wiki/Roadmap#release-notes</releaseNotes>
|
|
24
|
-
<copyright>© Microsoft Corporation. All rights reserved.</copyright>
|
|
25
|
-
<language>en-US</language>
|
|
26
|
-
<tags>Chakra,ChakraCore,javascript,js,ecmascript,compiler,platform,oss,opensource,native,nativepackage,C++,vc140</tags>
|
|
27
|
-
<dependencies>
|
|
28
|
-
<group targetFramework="native" />
|
|
29
|
-
</dependencies>
|
|
30
|
-
</metadata>
|
|
31
|
-
<files>
|
|
32
|
-
<!--Build-->
|
|
33
|
-
<file src="Microsoft.ChakraCore.ARM64.targets" target="build\native\$id$.targets"/>
|
|
34
|
-
|
|
35
|
-
<!--Lib-->
|
|
36
|
-
<file src="$targetroot$\arm64_release\ChakraCore.dll" target="lib\native\v140\arm64\release\ChakraCore.dll" />
|
|
37
|
-
<file src="$targetroot$\arm64_release\ChakraCore.lib" target="lib\native\v140\arm64\release\ChakraCore.lib" />
|
|
38
|
-
<file src="$targetroot$\arm64_release\ChakraCore.pdb" target="lib\native\v140\arm64\release\ChakraCore.pdb" />
|
|
39
|
-
<file src="$targetroot$\arm64_release\ch.exe" target="lib\native\v140\arm64\release\ch.exe" />
|
|
40
|
-
<file src="$targetroot$\arm64_release\ch.pdb" target="lib\native\v140\arm64\release\ch.pdb" />
|
|
41
|
-
|
|
42
|
-
<!--Copying Release to Debug for now-->
|
|
43
|
-
<file src="$targetroot$\arm64_release\ChakraCore.dll" target="lib\native\v140\arm64\debug\ChakraCore.dll" />
|
|
44
|
-
<file src="$targetroot$\arm64_release\ChakraCore.lib" target="lib\native\v140\arm64\debug\ChakraCore.lib" />
|
|
45
|
-
<file src="$targetroot$\arm64_release\ChakraCore.pdb" target="lib\native\v140\arm64\debug\ChakraCore.pdb" />
|
|
46
|
-
<file src="$targetroot$\arm64_release\ch.exe" target="lib\native\v140\arm64\debug\ch.exe" />
|
|
47
|
-
<file src="$targetroot$\arm64_release\ch.pdb" target="lib\native\v140\arm64\debug\ch.pdb" />
|
|
48
|
-
|
|
49
|
-
</files>
|
|
50
|
-
</package>
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
-
<Project ToolVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
3
|
-
<ItemDefinitionGroup>
|
|
4
|
-
<Link>
|
|
5
|
-
<AdditionalDependencies>$(MSBuildThisFileDirectory)..\..\lib\native\v140\$(Platform)\$(Configuration)\ChakraCore.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
|
6
|
-
</Link>
|
|
7
|
-
<!-- <ClCompile>
|
|
8
|
-
<AdditionalIncludeDirectories>$(MSBuildThisFileDirectory)include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
|
9
|
-
</ClCompile> -->
|
|
10
|
-
</ItemDefinitionGroup>
|
|
11
|
-
<ItemGroup>
|
|
12
|
-
<ReferenceCopyLocalPaths Include="$(MSBuildThisFileDirectory)..\..\lib\native\v140\$(Platform)\$(Configuration)\ChakraCore.dll" />
|
|
13
|
-
<ReferenceCopyLocalPaths Include="$(MSBuildThisFileDirectory)..\..\lib\native\v140\$(Platform)\$(Configuration)\ChakraCore.pdb" />
|
|
14
|
-
</ItemGroup>
|
|
15
|
-
</Project>
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Microsoft Corporation.
|
|
2
|
-
// Licensed under the MIT License.
|
|
3
|
-
|
|
4
|
-
#pragma once
|
|
5
|
-
|
|
6
|
-
#include "ChakraRuntime.h"
|
|
7
|
-
|
|
8
|
-
#include "ChakraCore.h"
|
|
9
|
-
#include "ChakraCoreDebugger.h"
|
|
10
|
-
|
|
11
|
-
namespace Microsoft::JSI {
|
|
12
|
-
|
|
13
|
-
class ChakraCoreRuntime : public ChakraRuntime {
|
|
14
|
-
public:
|
|
15
|
-
ChakraCoreRuntime(ChakraRuntimeArgs &&args) noexcept;
|
|
16
|
-
|
|
17
|
-
~ChakraCoreRuntime() noexcept;
|
|
18
|
-
|
|
19
|
-
#pragma region ChakraRuntime
|
|
20
|
-
|
|
21
|
-
void setupNativePromiseContinuation() noexcept override;
|
|
22
|
-
|
|
23
|
-
void startDebuggingIfNeeded() override;
|
|
24
|
-
|
|
25
|
-
void stopDebuggingIfNeeded() override;
|
|
26
|
-
|
|
27
|
-
std::unique_ptr<const facebook::jsi::Buffer> generatePreparedScript(
|
|
28
|
-
const std::string &sourceURL,
|
|
29
|
-
const facebook::jsi::Buffer &sourceBuffer) noexcept override;
|
|
30
|
-
|
|
31
|
-
facebook::jsi::Value evaluateJavaScriptSimple(const facebook::jsi::Buffer &buffer, const std::string &sourceURL)
|
|
32
|
-
override;
|
|
33
|
-
|
|
34
|
-
bool evaluateSerializedScript(
|
|
35
|
-
const facebook::jsi::Buffer &scriptBuffer,
|
|
36
|
-
const facebook::jsi::Buffer &serializedScriptBuffer,
|
|
37
|
-
const std::string &sourceURL,
|
|
38
|
-
JsValueRef *result) override;
|
|
39
|
-
|
|
40
|
-
#pragma endregion
|
|
41
|
-
|
|
42
|
-
private:
|
|
43
|
-
JsErrorCode enableDebugging(
|
|
44
|
-
JsRuntimeHandle runtime,
|
|
45
|
-
std::string const &runtimeName,
|
|
46
|
-
bool breakOnNextLine,
|
|
47
|
-
uint16_t port,
|
|
48
|
-
std::unique_ptr<DebugProtocolHandler> &debugProtocolHandler,
|
|
49
|
-
std::unique_ptr<DebugService> &debugService);
|
|
50
|
-
|
|
51
|
-
void ProcessDebuggerCommandQueue();
|
|
52
|
-
|
|
53
|
-
static void CALLBACK ProcessDebuggerCommandQueueCallback(void *callbackState);
|
|
54
|
-
|
|
55
|
-
std::unique_ptr<DebugProtocolHandler> m_debugProtocolHandler;
|
|
56
|
-
std::unique_ptr<DebugService> m_debugService;
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
} // namespace Microsoft::JSI
|