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

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

Github user jeking3 commented on a diff in the pull request:

    https://github.com/apache/thrift/pull/1437#discussion_r154679526
  
    --- Diff: lib/js/src/thrift.js ---
    @@ -599,8 +599,8 @@ Thrift.TWebSocketTransport.prototype = {
               //If the user made calls before the connection was fully
               //open, send them now
               this.send_pending.forEach(function(elem) {
    -             this.socket.send(elem.buf);
    -             this.callbacks.push((function() {
    +             self.socket.send(elem.buf);
    --- End diff --
    
    We don't run "js" through cross test right now. :|


> thrift.js: Incorrect usage of 'this' in TWebSocketTransport.__onOpen
> --------------------------------------------------------------------
>
>                 Key: THRIFT-4403
>                 URL: https://issues.apache.org/jira/browse/THRIFT-4403
>             Project: Thrift
>          Issue Type: Bug
>          Components: JavaScript - Library
>            Reporter: Philip Frank
>
> Inside the forEach callback 'this' will be the global object, not the 
> transport object, as the implementation seems to assume.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to