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

Introduce ChakraObjectRef and refactor ChakraRuntime #3445

Merged
merged 18 commits into from
Oct 21, 2019

Conversation

hansenyy
Copy link
Contributor

@hansenyy hansenyy commented Oct 17, 2019

This PR:

  • Introduces ChakraObjectRef, an RAII wrapper for JsRefs.
  • Replaces ChakraPropertyIdValue, ChakraStringValue, ChakraObjectValue, and ChakraWeakRefValue with a new class ChakraPointerValue, which is implemented on top of ChakraObjectRef.
  • Fix property ID comparison for ChakraRuntime.
  • Temporarily disables weak ref semantics for ChakraCore based Runtime. This functionality will be re-enabled in a future PR.
Microsoft Reviewers: Open in CodeFlow

@hansenyy hansenyy requested review from mganandraj, NikoAri, tudorms and a team October 17, 2019 00:56
@hansenyy hansenyy requested a review from a team as a code owner October 17, 2019 00:56
@ghost ghost added the vnext label Oct 17, 2019
Copy link

@NikoAri NikoAri left a comment

Choose a reason for hiding this comment

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

:shipit:

}
ChakraObjectRef ChakraRuntime::ToChakraObjectRef(
const facebook::jsi::Value &value) {
if (value.isUndefined()) {
Copy link
Member

@tudorms tudorms Oct 18, 2019

Choose a reason for hiding this comment

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

if (value.isUndefined()) { [](start = 2, length = 26)

(Nit) There is some duplication here for the various JsValueRef types; see if there's an opportunity to refactor #Pending

@hansenyy hansenyy merged commit 715de93 into microsoft:master Oct 21, 2019
@hansenyy hansenyy deleted the CharkaObjectRef branch October 21, 2019 05:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants