Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate NapiJsiRuntime from V8-JSI #8617

Merged
32 commits merged into from
Sep 18, 2021
Merged

Migrate NapiJsiRuntime from V8-JSI #8617

32 commits merged into from
Sep 18, 2021

Conversation

JunielKatarn
Copy link
Contributor

@JunielKatarn JunielKatarn commented Sep 11, 2021

Description

Moves the implementation of MakeNapiJsiRuntime from V8-JSI into React Native Windows.

Motivation

MakeNapiJsiRuntime exposes non-ABI-safe C++ JSI APIs.
Thus, it should not reside in the V8-JSI DLL boundary.
As an intermediate measure, moving such method and supporting types into RNW.

Pre-merge Checklist

  • Migrate integration test.
  • Address TODO comments.
Microsoft Reviewers: Open in CodeFlow

@JunielKatarn JunielKatarn requested a review from a team as a code owner September 11, 2021 09:47
@JunielKatarn JunielKatarn requested review from tudorms, vmoroz and a team September 11, 2021 09:47
Copy link
Member

@tudorms tudorms left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

Copy link
Member

@vmoroz vmoroz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🕐

@ghost ghost added the Needs: Author Feedback The issue/PR needs activity from its author (label drives bot activity) label Sep 13, 2021
@vmoroz
Copy link
Member

vmoroz commented Sep 13, 2021

Please make sure that we run the JSI tests for the new code.

@ghost ghost removed the Needs: Author Feedback The issue/PR needs activity from its author (label drives bot activity) label Sep 14, 2021
Copy link
Member

@vmoroz vmoroz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@ghost ghost merged commit a858af1 into microsoft:main Sep 18, 2021
@JunielKatarn JunielKatarn deleted the napi-jsirt branch September 18, 2021 02:02
JunielKatarn added a commit to jurocha-ms/react-native-windows that referenced this pull request Sep 20, 2021
* Add NapiJsiRuntime source and headers

* Implement up to NapiJsiRuntime::JsiHostFunctionCallback

* Change files

* Finished Shared NAPI wrappers

* Implemented miscellaneous utility methods

* Move macros into CPP

* yarn format

* Add TODO to rename MakeNapiJsiRuntime2

* Fix typo

* Consume MakeNapiJsiRuntime2

* Conditionally build NapiJsiRuntime.cpp

* Migrate test

* Move declarations into NapiJsiRuntime.cpp

* Delete NapiJsiRuntime_detail.h

* Re-enable NAPI_EXPERIMENTAL

* Added :NapiPointerValue definitions

* Use explicit captures

* Add export symbol for x86

* Ensure CreateExternalObject deletes scalars and arrays properly

* Use constants for RefHolder names

* Only run test if USE_V8 is defined

* Rename NapiTests to JsiTests

* Conditionally include Jsi Tests

* Rename MakeNapiJsiRuntime2 to MakeNodeApiJsiRuntime

Co-authored-by: dannyvv <dannyvv@microsoft.com>

* Move Shared\NapiJsiRuntime.* to MSRN.Cxx\NodeApiJsiRuntime.*

* Move JsiTest into MSRN.Cxx.UnitTests

* clang format

* Revert ABITests.vcxproj to main

* Default Cxx.UnitTests to NOT use V8

* Compile JsiTest only when using V8

Co-authored-by: dannyvv <dannyvv@microsoft.com>
JunielKatarn added a commit that referenced this pull request Sep 21, 2021
JunielKatarn added a commit to jurocha-ms/react-native-windows that referenced this pull request Sep 21, 2021
* Add NapiJsiRuntime source and headers

* Implement up to NapiJsiRuntime::JsiHostFunctionCallback

* Change files

* Finished Shared NAPI wrappers

* Implemented miscellaneous utility methods

* Move macros into CPP

* yarn format

* Add TODO to rename MakeNapiJsiRuntime2

* Fix typo

* Consume MakeNapiJsiRuntime2

* Conditionally build NapiJsiRuntime.cpp

* Migrate test

* Move declarations into NapiJsiRuntime.cpp

* Delete NapiJsiRuntime_detail.h

* Re-enable NAPI_EXPERIMENTAL

* Added :NapiPointerValue definitions

* Use explicit captures

* Add export symbol for x86

* Ensure CreateExternalObject deletes scalars and arrays properly

* Use constants for RefHolder names

* Only run test if USE_V8 is defined

* Rename NapiTests to JsiTests

* Conditionally include Jsi Tests

* Rename MakeNapiJsiRuntime2 to MakeNodeApiJsiRuntime

Co-authored-by: dannyvv <dannyvv@microsoft.com>

* Move Shared\NapiJsiRuntime.* to MSRN.Cxx\NodeApiJsiRuntime.*

* Move JsiTest into MSRN.Cxx.UnitTests

* clang format

* Revert ABITests.vcxproj to main

* Default Cxx.UnitTests to NOT use V8

* Compile JsiTest only when using V8

Co-authored-by: dannyvv <dannyvv@microsoft.com>
JunielKatarn added a commit to jurocha-ms/react-native-windows that referenced this pull request Sep 21, 2021
* Add NapiJsiRuntime source and headers

* Implement up to NapiJsiRuntime::JsiHostFunctionCallback

* Change files

* Finished Shared NAPI wrappers

* Implemented miscellaneous utility methods

* Move macros into CPP

* yarn format

* Add TODO to rename MakeNapiJsiRuntime2

* Fix typo

* Consume MakeNapiJsiRuntime2

* Conditionally build NapiJsiRuntime.cpp

* Migrate test

* Move declarations into NapiJsiRuntime.cpp

* Delete NapiJsiRuntime_detail.h

* Re-enable NAPI_EXPERIMENTAL

* Added :NapiPointerValue definitions

* Use explicit captures

* Add export symbol for x86

* Ensure CreateExternalObject deletes scalars and arrays properly

* Use constants for RefHolder names

* Only run test if USE_V8 is defined

* Rename NapiTests to JsiTests

* Conditionally include Jsi Tests

* Rename MakeNapiJsiRuntime2 to MakeNodeApiJsiRuntime

Co-authored-by: dannyvv <dannyvv@microsoft.com>

* Move Shared\NapiJsiRuntime.* to MSRN.Cxx\NodeApiJsiRuntime.*

* Move JsiTest into MSRN.Cxx.UnitTests

* clang format

* Revert ABITests.vcxproj to main

* Default Cxx.UnitTests to NOT use V8

* Compile JsiTest only when using V8

Co-authored-by: dannyvv <dannyvv@microsoft.com>
chrisglein pushed a commit to chrisglein/react-native-windows that referenced this pull request Sep 22, 2021
* Add NapiJsiRuntime source and headers

* Implement up to NapiJsiRuntime::JsiHostFunctionCallback

* Change files

* Finished Shared NAPI wrappers

* Implemented miscellaneous utility methods

* Move macros into CPP

* yarn format

* Add TODO to rename MakeNapiJsiRuntime2

* Fix typo

* Consume MakeNapiJsiRuntime2

* Conditionally build NapiJsiRuntime.cpp

* Migrate test

* Move declarations into NapiJsiRuntime.cpp

* Delete NapiJsiRuntime_detail.h

* Re-enable NAPI_EXPERIMENTAL

* Added :NapiPointerValue definitions

* Use explicit captures

* Add export symbol for x86

* Ensure CreateExternalObject deletes scalars and arrays properly

* Use constants for RefHolder names

* Only run test if USE_V8 is defined

* Rename NapiTests to JsiTests

* Conditionally include Jsi Tests

* Rename MakeNapiJsiRuntime2 to MakeNodeApiJsiRuntime

Co-authored-by: dannyvv <dannyvv@microsoft.com>

* Move Shared\NapiJsiRuntime.* to MSRN.Cxx\NodeApiJsiRuntime.*

* Move JsiTest into MSRN.Cxx.UnitTests

* clang format

* Revert ABITests.vcxproj to main

* Default Cxx.UnitTests to NOT use V8

* Compile JsiTest only when using V8

Co-authored-by: dannyvv <dannyvv@microsoft.com>
JunielKatarn added a commit that referenced this pull request Sep 23, 2021
* Migrate NapiJsiRuntime from V8-JSI (#8617)

* Add NapiJsiRuntime source and headers

* Implement up to NapiJsiRuntime::JsiHostFunctionCallback

* Change files

* Finished Shared NAPI wrappers

* Implemented miscellaneous utility methods

* Move macros into CPP

* yarn format

* Add TODO to rename MakeNapiJsiRuntime2

* Fix typo

* Consume MakeNapiJsiRuntime2

* Conditionally build NapiJsiRuntime.cpp

* Migrate test

* Move declarations into NapiJsiRuntime.cpp

* Delete NapiJsiRuntime_detail.h

* Re-enable NAPI_EXPERIMENTAL

* Added :NapiPointerValue definitions

* Use explicit captures

* Add export symbol for x86

* Ensure CreateExternalObject deletes scalars and arrays properly

* Use constants for RefHolder names

* Only run test if USE_V8 is defined

* Rename NapiTests to JsiTests

* Conditionally include Jsi Tests

* Rename MakeNapiJsiRuntime2 to MakeNodeApiJsiRuntime

Co-authored-by: dannyvv <dannyvv@microsoft.com>

* Move Shared\NapiJsiRuntime.* to MSRN.Cxx\NodeApiJsiRuntime.*

* Move JsiTest into MSRN.Cxx.UnitTests

* clang format

* Revert ABITests.vcxproj to main

* Default Cxx.UnitTests to NOT use V8

* Compile JsiTest only when using V8

Co-authored-by: dannyvv <dannyvv@microsoft.com>

* Remove backported change file

* Change files

Co-authored-by: dannyvv <dannyvv@microsoft.com>
JunielKatarn added a commit that referenced this pull request Sep 23, 2021
* Migrate NapiJsiRuntime from V8-JSI #8617

* Change files

* Drop HermesSamplingProfiler.cpp
JunielKatarn added a commit that referenced this pull request Sep 23, 2021
* Migrate NapiJsiRuntime from V8-JSI (#8617)

* Add NapiJsiRuntime source and headers

* Implement up to NapiJsiRuntime::JsiHostFunctionCallback

* Change files

* Finished Shared NAPI wrappers

* Implemented miscellaneous utility methods

* Move macros into CPP

* yarn format

* Add TODO to rename MakeNapiJsiRuntime2

* Fix typo

* Consume MakeNapiJsiRuntime2

* Conditionally build NapiJsiRuntime.cpp

* Migrate test

* Move declarations into NapiJsiRuntime.cpp

* Delete NapiJsiRuntime_detail.h

* Re-enable NAPI_EXPERIMENTAL

* Added :NapiPointerValue definitions

* Use explicit captures

* Add export symbol for x86

* Ensure CreateExternalObject deletes scalars and arrays properly

* Use constants for RefHolder names

* Only run test if USE_V8 is defined

* Rename NapiTests to JsiTests

* Conditionally include Jsi Tests

* Rename MakeNapiJsiRuntime2 to MakeNodeApiJsiRuntime

Co-authored-by: dannyvv <dannyvv@microsoft.com>

* Move Shared\NapiJsiRuntime.* to MSRN.Cxx\NodeApiJsiRuntime.*

* Move JsiTest into MSRN.Cxx.UnitTests

* clang format

* Revert ABITests.vcxproj to main

* Default Cxx.UnitTests to NOT use V8

* Compile JsiTest only when using V8

Co-authored-by: dannyvv <dannyvv@microsoft.com>

* Change files

* Set V8/JSI version to 0.64.24

* Drop HermesSamplingProfiler.cpp and InspectorPackagerConnection.cpp

* Update to older facebook::jsi::Runtime

Co-authored-by: dannyvv <dannyvv@microsoft.com>
ghost pushed a commit that referenced this pull request Sep 23, 2021
* Migrate NapiJsiRuntime from V8-JSI (#8617)

* Add NapiJsiRuntime source and headers

* Implement up to NapiJsiRuntime::JsiHostFunctionCallback

* Change files

* Finished Shared NAPI wrappers

* Implemented miscellaneous utility methods

* Move macros into CPP

* yarn format

* Add TODO to rename MakeNapiJsiRuntime2

* Fix typo

* Consume MakeNapiJsiRuntime2

* Conditionally build NapiJsiRuntime.cpp

* Migrate test

* Move declarations into NapiJsiRuntime.cpp

* Delete NapiJsiRuntime_detail.h

* Re-enable NAPI_EXPERIMENTAL

* Added :NapiPointerValue definitions

* Use explicit captures

* Add export symbol for x86

* Ensure CreateExternalObject deletes scalars and arrays properly

* Use constants for RefHolder names

* Only run test if USE_V8 is defined

* Rename NapiTests to JsiTests

* Conditionally include Jsi Tests

* Rename MakeNapiJsiRuntime2 to MakeNodeApiJsiRuntime

Co-authored-by: dannyvv <dannyvv@microsoft.com>

* Move Shared\NapiJsiRuntime.* to MSRN.Cxx\NodeApiJsiRuntime.*

* Move JsiTest into MSRN.Cxx.UnitTests

* clang format

* Revert ABITests.vcxproj to main

* Default Cxx.UnitTests to NOT use V8

* Compile JsiTest only when using V8

Co-authored-by: dannyvv <dannyvv@microsoft.com>

* Change files

* Update to older facebook::jsi::Runtime

Co-authored-by: dannyvv <dannyvv@microsoft.com>
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: JSI AutoMerge Causes a PR to be automatically merged once all requirements are passed (label drives bot activity)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants