forked from nodejs/node-chakracore
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chakrashim: Fix
GetOwnPropertyNames
and GetPropertyNames
As per spec `Object.getOwnPropertyNames()` and `Object.getPropertyNames()` should return an array of strings. However there is no standardization of what should happen if these methods are called natively (through NaN for example). For these 2 APIs, v8 returns an array containing mix of numbers for numeric properties and strings for normal string properties. This breaks [grpc](https://github.com/grpc/grpc) module because it [expects](https://github.com/grpc/grpc/blob/master/src/node/ext/call.cc#L673-L683) returned values to be numeric. Fix: Once we get the result from, iterate over the result and call `parseInt` to save numeric value of the key. PR-URL: nodejs/node#169 Reviewed-By: Jianchun Xu <[email protected]>
- Loading branch information
1 parent
8e66382
commit 9716837
Showing
5 changed files
with
39 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters