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

Martin Hejnfelt closed THRIFT-4132.
-----------------------------------
    Resolution: Invalid

This bug ticket is wrong, and simply due to a missing include and my missing 
knowledge about how javascript engines inform about undefined objects or 
whatever we call them.

> Generated JavaScript code is missing a undefined check
> ------------------------------------------------------
>
>                 Key: THRIFT-4132
>                 URL: https://issues.apache.org/jira/browse/THRIFT-4132
>             Project: Thrift
>          Issue Type: Bug
>          Components: JSON - Compiler
>    Affects Versions: 0.10.0
>         Environment: All
>            Reporter: Martin Hejnfelt
>
> The generated code of a *_result object can take an "args" argument to its 
> "constructor". However, at least when using WebSocket, the *_result object is 
> not passed an "args" parameter, hence args is undefined. However the code 
> still makes an instanceof test on args, causing an exception to be thrown at 
> least on newer browsers (Tested on Chrome 57 and Firefox 52). Adding an "args 
> !== undefined &&" in front of this, makes everything work nicely again.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to