[ 
https://issues.apache.org/jira/browse/THRIFT-3494?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Wade Simmons updated THRIFT-3494:
---------------------------------
    Description: 
Newer versions of Node.js (such as 4.2.x) use multiple implementations for 
Buffer objects and you cannot just use {{instanceof Buffer}} to detect them. 
Node instead has provided a {{Buffer.isBuffer}} method since at least version 
0.8 which should be used to detect buffers.

The current {{instanceof Buffer}} method can fail like this with Node 4.2.3:

{code}
Error: writeString called without a string/Buffer argument: [object ArrayBuffer]
{code}

Opening Github pull request with the patch shortly.

  was:
Newer versions of Node.js (such as 4.2.x) use multiple implementations for 
Buffer objects and you cannot just use {{instanceof Buffer}} to detect them. 
Node instead has provided a {{Buffer.isBuffer}} method since at least version 
0.8 which should be used to detect buffers.

The current {{instanceof Buffer}} method can fail like this with Node 4.2.3:

{{{
Error: writeString called without a string/Buffer argument: [object ArrayBuffer]
}}}

Opening Github pull request with the patch shortly.


> Node.js should use Buffer.isBuffer
> ----------------------------------
>
>                 Key: THRIFT-3494
>                 URL: https://issues.apache.org/jira/browse/THRIFT-3494
>             Project: Thrift
>          Issue Type: Bug
>          Components: Node.js - Library
>    Affects Versions: 0.9.3
>            Reporter: Wade Simmons
>
> Newer versions of Node.js (such as 4.2.x) use multiple implementations for 
> Buffer objects and you cannot just use {{instanceof Buffer}} to detect them. 
> Node instead has provided a {{Buffer.isBuffer}} method since at least version 
> 0.8 which should be used to detect buffers.
> The current {{instanceof Buffer}} method can fail like this with Node 4.2.3:
> {code}
> Error: writeString called without a string/Buffer argument: [object 
> ArrayBuffer]
> {code}
> Opening Github pull request with the patch shortly.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to