-
Notifications
You must be signed in to change notification settings - Fork 1.2k
jsrt: cleanup CHAKRACOREBUILD_ symbol in headers #3400
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
Conversation
@curtisman @obastemur As I'm limiting/deprecating the other use of @agarwal-sandeep Questions:
|
@@ -1607,6 +1608,7 @@ CHAKRA_API JsReleaseSharedArrayBufferContentHandle(_In_ JsSharedArrayBufferConte | |||
return JsNoError; | |||
}); | |||
} | |||
#endif // _CHAKRACOREBUILD |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: commented definition doesn't match.
@jianchun initially when JsRT debugging code was written we didn't had ChakraCore specific APIs (the plan was to have them in chakra build as well) but now I think we should limit it to ChakraCore only. This should give some binary size reduction in chakra as well. In reply to: 316569321 [](ancestors = 316569321) |
@obastemur Thanks for review! Do you recall the reason of adding
|
`CHAKRACOREBUILD_` symbol should not be defined in `ChakraCommon.h`. The later is included by Chakra JSRT (Windows 10 SDK) and would thus incorrectly define `CHAKRACOREBUILD_` and expose ChakraCore APIs (Note that `NTBUILD` is not defined when a user includes Windows SDK headers). Move the def to `ChakraCore.h` to solve this problem. Normally including `ChakraCore.h` means using ChakraCore only APIs. (We define the symbol only when `!NTBUILD` because of one exception -- shared implementation `Jsrt.cpp` includes `ChakraCore.h`.) Moved `#ifdef CHAKRACOREBUILD_` to top of file to enclose all recent new ChakraCore APIs, to help ensure those APIs not defined/exposed to Chakra. Lastly renamed all `CHAKRACOREBUILD_` to `_CHAKRACOREBUILD`. Use this one symbol to differentiate ChakraCore APIs and implementations.
LGTM. @jianchun Thanks for fixing this! |
@obastemur Thanks for review! |
Merge pull request #3400 from jianchun:ccblddef `CHAKRACOREBUILD_` symbol should not be defined in `ChakraCommon.h`. The later is included by Chakra JSRT (Windows 10 SDK) and would thus incorrectly define `CHAKRACOREBUILD_` and expose ChakraCore APIs (Note that `NTBUILD` is not defined when a user includes Windows SDK headers). Move the def to `ChakraCore.h` to solve this problem. Normally including `ChakraCore.h` means using ChakraCore only APIs. (We define the symbol only when `!NTBUILD` because of one exception -- shared implementation `Jsrt.cpp` includes `ChakraCore.h`.) Moved `#ifdef CHAKRACOREBUILD_` to top of file to enclose all recent new ChakraCore APIs, to help ensure those APIs not defined/exposed to Chakra. Lastly renamed all `CHAKRACOREBUILD_` to `_CHAKRACOREBUILD`. Use this one symbol to differentiate ChakraCore APIs and implementations.
…ol in headers Merge pull request #3400 from jianchun:ccblddef `CHAKRACOREBUILD_` symbol should not be defined in `ChakraCommon.h`. The later is included by Chakra JSRT (Windows 10 SDK) and would thus incorrectly define `CHAKRACOREBUILD_` and expose ChakraCore APIs (Note that `NTBUILD` is not defined when a user includes Windows SDK headers). Move the def to `ChakraCore.h` to solve this problem. Normally including `ChakraCore.h` means using ChakraCore only APIs. (We define the symbol only when `!NTBUILD` because of one exception -- shared implementation `Jsrt.cpp` includes `ChakraCore.h`.) Moved `#ifdef CHAKRACOREBUILD_` to top of file to enclose all recent new ChakraCore APIs, to help ensure those APIs not defined/exposed to Chakra. Lastly renamed all `CHAKRACOREBUILD_` to `_CHAKRACOREBUILD`. Use this one symbol to differentiate ChakraCore APIs and implementations.
…REBUILD_ symbol in headers Merge pull request #3400 from jianchun:ccblddef `CHAKRACOREBUILD_` symbol should not be defined in `ChakraCommon.h`. The later is included by Chakra JSRT (Windows 10 SDK) and would thus incorrectly define `CHAKRACOREBUILD_` and expose ChakraCore APIs (Note that `NTBUILD` is not defined when a user includes Windows SDK headers). Move the def to `ChakraCore.h` to solve this problem. Normally including `ChakraCore.h` means using ChakraCore only APIs. (We define the symbol only when `!NTBUILD` because of one exception -- shared implementation `Jsrt.cpp` includes `ChakraCore.h`.) Moved `#ifdef CHAKRACOREBUILD_` to top of file to enclose all recent new ChakraCore APIs, to help ensure those APIs not defined/exposed to Chakra. Lastly renamed all `CHAKRACOREBUILD_` to `_CHAKRACOREBUILD`. Use this one symbol to differentiate ChakraCore APIs and implementations.
CHAKRACOREBUILD_
symbol should not be defined inChakraCommon.h
. Thelater is included by Chakra JSRT (Windows 10 SDK) and would thus
incorrectly define
CHAKRACOREBUILD_
and expose ChakraCore APIs (Notethat
NTBUILD
is not defined when a user includes Windows SDK headers).Move the def to
ChakraCore.h
to solve this problem. Normally includingChakraCore.h
means using ChakraCore only APIs. (We define the symbolonly when
!NTBUILD
because of one exception -- shared implementationJsrt.cpp
includesChakraCore.h
.)Moved
#ifdef CHAKRACOREBUILD_
to top of file to enclose all recent newChakraCore APIs, to help ensure those APIs not defined/exposed to Chakra.
Lastly renamed all
CHAKRACOREBUILD_
to_CHAKRACOREBUILD
. Use this onesymbol to differentiate ChakraCore APIs and implementations.