Skip to content

Conversation

sgrekhov
Copy link
Contributor

No description provided.

@sgrekhov sgrekhov requested review from eernstg and srujzs September 12, 2025 09:49
Copy link
Member

@eernstg eernstg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, awaiting further input!

/// > [JSDataView] and vice versa unless it was instantiated in JavaScript.
///
/// @description Check that on `dart2wasm` if [ByteBuffer] was instantiated in
/// JavaScript then this operations unwraps it and therefore changes in the
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo:

Suggested change
/// JavaScript then this operations unwraps it and therefore changes in the
/// JavaScript then this operation unwraps it. Hence, changes in the

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you. Fixed.

/// versa.
///
/// @description Check that this getter converts this [JSDataView] to a
/// [ByteData]. Test [JSDataView] created in JavaScript.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a nit: This also tests that the original DataView is modified when modifying the ByteData.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment updated.

/// Modifications to this [JSDataView] will affect the [ByteData] and vice
/// versa.
///
/// @description Check that in case of `dart2js` this operation is a cast and
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we check this isn't the case in dart2wasm?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At first I didn't add this because it isn't said that wrapping/unwrapping operation cannot return the same object. But in our meeting this morning, @eernstg convinced me that it's important for users to know that these are distinct objects. Updated.

/// Modifications to this [JSDataView] will affect the [ByteData] and vice
/// versa.
///
/// @description Check that this getter converts this [JSDataView] to a
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment as above.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated.

Copy link
Contributor Author

@sgrekhov sgrekhov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated. Please take another look.

/// > [JSDataView] and vice versa unless it was instantiated in JavaScript.
///
/// @description Check that on `dart2wasm` if [ByteBuffer] was instantiated in
/// JavaScript then this operations unwraps it and therefore changes in the
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you. Fixed.

/// Modifications to this [JSDataView] will affect the [ByteData] and vice
/// versa.
///
/// @description Check that in case of `dart2js` this operation is a cast and
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At first I didn't add this because it isn't said that wrapping/unwrapping operation cannot return the same object. But in our meeting this morning, @eernstg convinced me that it's important for users to know that these are distinct objects. Updated.

/// versa.
///
/// @description Check that this getter converts this [JSDataView] to a
/// [ByteData]. Test [JSDataView] created in JavaScript.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment updated.

/// Modifications to this [JSDataView] will affect the [ByteData] and vice
/// versa.
///
/// @description Check that this getter converts this [JSDataView] to a
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated.

@sgrekhov sgrekhov requested review from eernstg and srujzs September 15, 2025 08:59
Copy link

@srujzs srujzs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks!

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.

3 participants