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

Revert "BlobManager: implement Blob from ArrayBuffer (#39276)" #41170

Conversation

CodyJasonBennett
Copy link
Contributor

Summary:

As per #41079, we're outputting ASCII encoded data URIs to FileReader.readAsDataURL due to lack of native ArrayBuffer support and unclear use of encoding to align with web. I'll revisit this at a later point with a better testing strategy once we have a good idea of how this should behave internally.

Aside from purely reverting #39276, I've kept the use of ArrayBuffer.isView(part) to the previous part instanceof global.ArrayBufferView since it is more correct.

Changelog:

[INTERNAL] [REMOVED] - Revert Blob from ArrayBuffer

Test Plan:

Run the following at the project root to selectively test changes:

jest packages/react-native/Libraries/Blob

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Oct 24, 2023
@facebook-github-bot facebook-github-bot added the Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. label Oct 24, 2023
@facebook-github-bot
Copy link
Contributor

@dmytrorykun has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

1 similar comment
@facebook-github-bot
Copy link
Contributor

@dmytrorykun has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Oct 31, 2023
@facebook-github-bot
Copy link
Contributor

@dmytrorykun merged this pull request in 572dd76.

@CodyJasonBennett CodyJasonBennett deleted the blobmanager/revert-arraybuffer branch October 31, 2023 19:26
Othinn pushed a commit to Othinn/react-native that referenced this pull request Jan 9, 2024
facebook#41170)

Summary:
As per facebook#41079, we're outputting ASCII encoded data URIs to `FileReader.readAsDataURL` due to lack of native `ArrayBuffer` support and unclear use of encoding to align with web. I'll revisit this at a later point with a better testing strategy once we have a good idea of how this should behave internally.

Aside from purely reverting facebook#39276, I've kept the use of `ArrayBuffer.isView(part)` to the previous `part instanceof global.ArrayBufferView` since it is more correct.

## Changelog:

[INTERNAL] [REMOVED] - Revert Blob from ArrayBuffer

Pull Request resolved: facebook#41170

Test Plan:
Run the following at the project root to selectively test changes:

`jest packages/react-native/Libraries/Blob`

Reviewed By: cipolleschi

Differential Revision: D50601036

Pulled By: dmytrorykun

fbshipit-source-id: 0ef5c960c253db255c2f8532ea1f44111093706c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged This PR has been merged. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants