-
Notifications
You must be signed in to change notification settings - Fork 1.2k
JSRT changes to support shim improvements #5923
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
Also allow Js[Has|Get|Set]ExternalData to apply to the target if it is a proxy.
…might not be cleared causing memory leak
Currently support serializing/deserializing only objects managed by javascript engine. Support for DOMObject is yet to come
Moving SCA to chakracore Part1 Currently support serializing/deserializing only objects managed by javascript engine. Support for DOMObject is yet to come
Support for transferring arraybuffer.
Part2 Serialization/Deserialization for ArrayBuffer Support for transferring arraybuffer.
…hookup Part 3 : Serialization/Deserialization Host object hookup
…nterceptors. The CEO will be only when interceptors are needed. Otherwise, we will still use the JsrtExternalObject.
…c in the shim. Avoid determining whether a property name is numeric in the shim.
…nterceptors don't create property string for indexed property interceptors
Fix JsrtExternalObject creation asserts.
liminzhu
left a comment
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.
Only leaving some high level comments for now.
lib/Jsrt/ChakraCommon.h
Outdated
| /// <returns> | ||
| /// The code <c>JsNoError</c> if the operation succeeded, a failure code otherwise. | ||
| /// </returns> | ||
| CHAKRA_API |
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.
Can we get this and the other typedefs into ChakraCore.h? ChakraCommon is for shared APIs between Chakra and ChakraCore.
lib/Jsrt/ChakraCommon.h
Outdated
| /// <param name="data"> | ||
| /// The external data that was passed in when creating the object being traced. | ||
| /// </param> | ||
| typedef void (CHAKRA_CALLBACK *JsTraceCallback)(_In_opt_ void *data); |
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.
Missed this guy - should be in chakracore.h
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.
I tried moving it to ChakraCore.h, but we still use this typedef in ChakraFull, so it seemed kind of annoying. I guess I can #ifdef out all the places though
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.
hmmmm, i thought the callback is only used with JsCreateTracedExternalObject and JsCreateCustomExternalObject which is in chakracore.h? Btw is there any reason these two API are not merged into one?
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.
I guess the APIs for these could be merged, but underneath they create very different types of objects so I'd rather hold off for now.
We share code for JsrtExternalObjects between ChakraCore and ChakraFull, and even though trace callback is only used in ChakraCore, it was referenced there in both builds... I moved it all behind ifdef now though
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.
SGTM, thx!
e3a1f7b to
08a4d40
Compare
Merge pull request #5923 from MikeHolman:mergeshim This change adds a laundry list of new (still very experimental) JSRT APIs, to support improvements in chakra shim functionality and performance.
This change adds a laundry list of new (still very experimental) JSRT APIs, to support improvements in chakra shim functionality and performance.