Kudo / react-native-v8

Opt-in V8 runtime for React Native Android
MIT License
924 stars 69 forks source link

Fix JSI crash during convert property numeric names. #15

Closed Kudo closed 5 years ago

Kudo commented 5 years ago

JSI expects getPropertyNames() returned a string array. However, V8 by default will try to convert the property name as number if possible. For the case to pass { '1': 'numeric_string_key' } through RN bridge, V8 will crash from unexpected data type that the object property name was being converted to number.

The commit use V8's v8::KeyConversionMode::kConvertToString option to convert all property names into string type. Fixes #10