Skip to content

Buffer.prototype.slice does not work on iOS 10 #136

@jonasschnelli

Description

@jonasschnelli

I tracked down an issue on cordova (includes node.js) where Buffer.prototype.slice result in returning the same value as the input buffer.

In iOS <10, this results shifting out 16 bytes:

var out = this.cache.slice(0, 16)
this.cache = this.cache.slice(16)

In iOS 10, this.cache will be unmodified.

I haven't tracked it down, but seems to be a Buffer.TYPED_ARRAY_SUPPORT problem.
If I remove the if at

buffer/index.js

Line 1078 in c5267f4

if (Buffer.TYPED_ARRAY_SUPPORT) {
it does work on iOS 10.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions