-
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
Add JsGetDataViewInfo support #3462
Conversation
lib/Runtime/Debug/TTEventLog.cpp
Outdated
NSLogEvents::JsRTSingleVarArgumentAction* giAction = this->RecordGetInitializedEvent_DataOnly<NSLogEvents::JsRTSingleVarArgumentAction, NSLogEvents::EventKind::GetDataViewInfoActionTag>(); | ||
NSLogEvents::SetVarItem_0(giAction, TTD_CONVERT_JSVAR_TO_TTDVAR(var)); | ||
|
||
//entry/exit status should be set to clead by initialization so don't need to do anything |
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.
Typo in comment? I assume you mean clear
?
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.
Yeah, that was actually a copy/paste so I'll fix the other one as well.
Match the existing JsGetTypedArrayInfo signature in order to support making similar queries for DataViews.
lgtm |
Merge pull request #3462 from kfarnung:dataview Match the existing JsGetTypedArrayInfo signature in order to support making similar queries for DataViews.
/// The code <c>JsNoError</c> if the operation succeeded, a failure code otherwise. | ||
/// </returns> | ||
CHAKRA_API | ||
JsGetDataViewInfo( |
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.
There is very similar API JsGetDataViewStorage
. Can we reuse this? What is the use-case?
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.
Yeah, I thought the same thing at first, but that method is purely interested in the raw storage. This method returns the parameters which were passed to the create method and I couldn't see a good way to get them (other than using script). Since TypedArray and DataView are both views over an ArrayBuffer, I think it makes sense for them to have similar interaction models.
Match the existing JsGetTypedArrayInfo signature in order to support
making similar queries for DataViews.