Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[expo] Fix crash on v8 #19843

Merged
merged 3 commits into from Nov 3, 2022
Merged

[expo] Fix crash on v8 #19843

merged 3 commits into from Nov 3, 2022

Conversation

Kudo
Copy link
Contributor

@Kudo Kudo commented Nov 3, 2022

Why

react-native-v8 app will crash on sdk 47 app

How

the NativeModules is a host object, and in react-native-v8, there are some internal data structures for a host object. after monkey patching the NativeModules, it is now a proxy object. from the Reflect.get(target, prop, receiver) call, it will use host object getter but pass the proxy object (not the original host object). the crash happens at the react-native-v8 code here

we don't return something else from the proxied interceptor; using target[prop] is enough.

Test Plan

create a v8 app and patch node_modules/expo/build/proxies/NativeModules.js

Checklist

@expo-bot expo-bot added the bot: passed checks ExpoBot has nothing to complain about label Nov 3, 2022
@Kudo Kudo marked this pull request as ready for review November 3, 2022 15:41
@Kudo Kudo requested a review from lukmccall November 3, 2022 15:41
@Kudo Kudo merged commit daec5fc into main Nov 3, 2022
@Kudo Kudo deleted the @kudo/sdk47/fix-v8-crash branch November 3, 2022 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot: passed checks ExpoBot has nothing to complain about
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants