-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Expose JsHasOwnProperty #3316
Expose JsHasOwnProperty #3316
Conversation
@obastemur This may need to be updated based on the outcome of #3207. I just followed the existing pattern for |
/cc @liminzhu |
lib/Jsrt/Jsrt.cpp
Outdated
VALIDATE_INCOMING_OBJECT(object, scriptContext); | ||
VALIDATE_INCOMING_PROPERTYID(propertyId); | ||
PARAM_NOT_NULL(hasOwnProperty); | ||
*hasOwnProperty = nullptr; |
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.
*hasOwnProperty = nullptr; [](start = 7, length = 27)
shouldn't be initialized to false? I know at other places these variables are initialized to nullptr, but it should be false in those cases as well.
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.
Ah, yeah, that came up in @obastemur PR as well, I'll take a quick scan and fix them up.
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.
We should add this to the wiki as well.
LGTM |
lib/Runtime/Debug/TTEvents.h
Outdated
@@ -169,7 +169,8 @@ namespace TTD | |||
CodeParseActionTag, | |||
CallExistingFunctionActionTag, | |||
|
|||
Count | |||
Count, | |||
HasOwnPropertyActionTag |
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.
That was dumb.
Enable support for usage in node's n-api. Added a new unit test for the functionality.
@mrkmarron Can you quickly sanity check my TTD changes? I'm going to need to write a new test to validate them. |
LGTM |
Merge pull request #3316 from kfarnung:hasownprop Enable support for usage in node's n-api. Added a new unit test for the functionality.
Added a page to the wiki and updated the reference list: https://github.com/Microsoft/ChakraCore/wiki/JsHasOwnProperty |
@kfarnung awesome! I added an experimental note to the wiki temporarily. Seems like a great addition to Chakra APIs as well and this is just in case Windows team has some feedback along the process. |
Enable support for usage in node's n-api. Added a new unit test for
the functionality.