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

Add JsGetDataViewInfo support #3462

Merged
merged 2 commits into from
Jul 31, 2017
Merged

Conversation

kfarnung
Copy link
Contributor

Match the existing JsGetTypedArrayInfo signature in order to support
making similar queries for DataViews.

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
Copy link
Contributor

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?

Copy link
Contributor Author

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.

kfarnung added 2 commits July 31, 2017 15:48
Match the existing JsGetTypedArrayInfo signature in order to support
making similar queries for DataViews.
@mrkmarron
Copy link
Contributor

lgtm

@chakrabot chakrabot merged commit 3e20cf2 into chakra-core:release/1.7 Jul 31, 2017
chakrabot pushed a commit that referenced this pull request Jul 31, 2017
Merge pull request #3462 from kfarnung:dataview

Match the existing JsGetTypedArrayInfo signature in order to support making similar queries for DataViews.
chakrabot pushed a commit that referenced this pull request Jul 31, 2017
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(
Copy link
Contributor

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?

Copy link
Contributor Author

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.

@kfarnung kfarnung deleted the dataview branch July 31, 2017 23:44
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.

6 participants