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

Conversation

Projects
None yet
2 participants
@haadcode
Copy link
Contributor

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 :bug: Add support for TypedArrays in IPC. Add support for TypedArrays in IPC. Jul 22, 2016

haadcode added some commits Jul 22, 2016

@zcbenz

This comment has been minimized.

Copy link
Member

zcbenz commented Jul 25, 2016

Thanks!

@zcbenz zcbenz merged commit 200d09c into electron:master Jul 25, 2016

1 check failed

continuous-integration/travis-ci/pr The Travis CI build failed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.