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

Update Jsrt Utf8 types and naming #2251

Merged
merged 1 commit into from
Dec 22, 2016
Merged

Conversation

obastemur
Copy link
Collaborator

No description provided.

@obastemur
Copy link
Collaborator Author

Fixes #1918

@@ -163,7 +163,7 @@ JsGetModuleHostInfo(
_In_ JsModuleHostInfoKind moduleHostInfo,
_Outptr_result_maybenull_ void** hostInfo);

#ifndef NTBUILD
#ifdef CHAKRACOREBUILD_

Choose a reason for hiding this comment

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

Could you elaborate why we need this #ifdef (either NTBUILD or CHAKRACOREBUILD_)? My understanding is that ChakraCore.h is the header for ChakraCore only thus is always CHAKRACOREBUILD. NTBUILD does not use this header at all.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We had discussed this over emails. NTBUILD naming gives a wrong impression.

Choose a reason for hiding this comment

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

We had discussed this over emails. NTBUILD naming gives a wrong impression.

That was not my question. I was saying nothing was needed.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'm not sure when and where we had discussed this but I had brought this ifdef after a discussion. I can happily remove it.

Choose a reason for hiding this comment

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

Unless you find out why you needed these, removing them seems cleaner to me. (The original design did not require #ifdef -- "ChakraCommon.h" was supposed to hold APIs common to Core and Full. "ChakraCore.h" was supposed to hold new ChakraCore APIs which might later be promoted to "ChakraCommon.h".)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Agree. Instead of maintaining this, will remove it for good.

@@ -163,7 +163,7 @@ JsGetModuleHostInfo(
_In_ JsModuleHostInfoKind moduleHostInfo,
_Outptr_result_maybenull_ void** hostInfo);

#ifndef NTBUILD
#ifdef CHAKRACOREBUILD_

Choose a reason for hiding this comment

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

CHAKRACOREBUILD_ is a bit of uncommon style (_ at the end). Does other option work (CHAKRACORE_BUILD, _CHAKRACORE_BUILD)?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The styling was @curtisman 's choice and I also liked it. The _ at the end gives private use only impression.

@jianchun
Copy link

The styling was @curtisman 's choice and I also liked it. The _ at the end gives private use only impression.

Usually we use leading _ to indicate private use.

@jianchun
Copy link

Do we plan to consolidate JsDiagEvaluate to take JsValueRef expression?

@liminzhu @agarwal-sandeep

@agarwal-sandeep
Copy link
Collaborator

@jianchun @obastemur Yes we should, I had same feedback when we were doing xplat string APIs and I was assuming this PR would cover that. @obastemur can we open an issue

@obastemur
Copy link
Collaborator Author

@agarwal-sandeep @jianchun I didn't update JsDiagEvaluateUtf8 to JsDiagEvaluate since we already have one for ChakraFull with same name. As for the JsValueRef expression, what is the suggestion here?

@agarwal-sandeep
Copy link
Collaborator

@liminzhu Since JsDiagEvaluate is new API should we only have a JsValueRef version? The API is specific to debugger and not a common user API which will be used frequently, we can have just one xplat JsValueRef API and remove the Windows wchar_t API.

@jianchun @obastemur @digitalinfinity

@jianchun
Copy link

@agarwal-sandeep @jianchun I didn't update JsDiagEvaluateUtf8 to JsDiagEvaluate since we already have one for ChakraFull with same name. As for the JsValueRef expression, what is the suggestion here?

@agarwal-sandeep Is "ChakraDebug.h" another header shared by ChakraCore and ChakraFull, or is it ChakraCore only? Is "JsDiagEvalute" supposed to be a ChakraFull API? (Even if it is, I suspect we haven't and are not releasing it in Windows SDK, thus we are free to make changes to it. Is this correct?)

@obastemur
Copy link
Collaborator Author

Even if it is, I suspect we haven't and are not releasing it in Windows SDK

Makes sense. There is no JsDiagEvalute reference on MSDN.

@agarwal-sandeep
Copy link
Collaborator

@jianchun ChakraCore.h is currently only included in ChakraCore, initial plan was to have this in Chakra as well but then the plans changed. Until and unless it goes in Chakra it won't be in Windows SDK. Yes we should be able to make changes but want to confirm with @liminzhu.

@obastemur
Copy link
Collaborator Author

@jianchun @agarwal-sandeep Thanks for the review

@chakrabot chakrabot merged commit adbea39 into chakra-core:master Dec 22, 2016
chakrabot pushed a commit that referenced this pull request Dec 22, 2016
Merge pull request #2251 from obastemur:jsrt_utf8
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.

5 participants