[
https://issues.apache.org/jira/browse/THRIFT-1043?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Wade Simmons updated THRIFT-1043:
---------------------------------
Attachment: Fix-how-the-length-of-a-map-is-calculated.patch
Fix how the length of a map is calculated.
We can use Object.keys() in Node.js. Not all browsers support that method so we
have to calculate it ourselves for the browser implementation.
> Fix how the length of a map is calculated
> -----------------------------------------
>
> Key: THRIFT-1043
> URL: https://issues.apache.org/jira/browse/THRIFT-1043
> Project: Thrift
> Issue Type: Bug
> Components: JavaScript - Compiler, JavaScript - Library
> Affects Versions: 0.5, 0.6
> Reporter: Wade Simmons
> Attachments: Fix-how-the-length-of-a-map-is-calculated.patch
>
>
> The current version of the JavaScript compiler uses map.length to calculate
> the size of a map, but this is not correct (this only works for arrays). This
> patch uses `Object.keys(map).length` for Node.js and a more compatible `for
> (k in map) ...` implementation for browsers.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.