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 support for TypedArrays in IPC. #6572

Merged
merged 4 commits into from
Jul 25, 2016
Merged

Add support for TypedArrays in IPC. #6572

merged 4 commits into from
Jul 25, 2016

Conversation

haadcode
Copy link
Contributor

@haadcode haadcode commented Jul 22, 2016

Fixes #2104.

When using Buffer shims in your application, such as https://www.npmjs.com/package/buffer, the IPC via remote currently handles TypedArrays (eg. UInt8Array) as objects and fails to transport the values as function params or return values.

This PR will add support for transporting TypedArrays between the renderer and main process. TypedArrays get converted to regular Arrays on the sending side (remote) and to Node.js Buffers on the receiving side (rpc-server).

Read the spec but wasn't sure if I should add a test and where to put it, so there's no test for this change. If you want to test this, I'd be happy to add one if you can advice where to put it.

@haadcode haadcode changed the title 🐛 Add support for TypedArrays in IPC. Add support for TypedArrays in IPC. Jul 22, 2016
@zcbenz
Copy link
Contributor

zcbenz commented Jul 25, 2016

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.

2 participants