Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Makes HermesRuntimeImpl::isArray proxy-compatible
When using hermes engine, [`dynamicFromValue` in React Native](https://github.com/facebook/hermes/blob/main/API/jsi/jsi/JSIDynamic.cpp#L166) calls `isArray` here to check if the input object is an array. Consider this piece of code: ```js const list = ['a', 'b', 'c', 'd']; const proxyed_list = new Proxy(list, {}); ``` The `proxyed_list` behaves exactly the same as list in Javascript. But when been passed to native and converted to `folly::dynamic` by `dynamicFromValue`, `proxyed_list` will be converted to `{"0": "a", "1": "b", "2": "c", "3": "d"}` but not the expected `["a", "b", "c", "d"]`. This patch implements similar routines in commit [26840ed](26840ed#diff-059b8f2fcb0235b35582efc591e065bd8caa898c3ea2ef2a3e453bff97584e4dR1575) and makes `isArray` proxy-compatible.
- Loading branch information