[ 
https://issues.apache.org/jira/browse/THRIFT-3494?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15063166#comment-15063166
 ] 

ASF GitHub Bot commented on THRIFT-3494:
----------------------------------------

GitHub user wadey opened a pull request:

    https://github.com/apache/thrift/pull/748

    THRIFT-3494 use Buffer.isBuffer

    https://issues.apache.org/jira/browse/THRIFT-3494

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/wadey/thrift THRIFT-3494-nodejs-isbuffer

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/thrift/pull/748.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #748
    
----
commit 8c686c23d07079e385601d9c909dfa57916fca51
Author: Wade Simmons <w...@wades.im>
Date:   2015-12-18T00:22:44Z

    THRIFT-3494 use Buffer.isBuffer

----


> 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:
> {{{
> Error: writeString called without a string/Buffer argument: [object 
> ArrayBuffer]
> }}}
> Opening Github pull request with the patch shortly.



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

Reply via email to