Please sign in to comment.
Android: fix JSC crash in dev
Summary: On Android with dev mode on, we're seeing a regular SIGSEGV when pushing a lot of animation declarations over the bridge. We tracked this down to being not specific to animations, but the crash is caused in `deepFreezeAndThrowOnMutationInDev`. Specifically: the provided object to freeze is modified while looping, replacing the current key access to a getter/setter. After the modification, JSC crashes during retrieval of the next key - but only when there are a lot of events passing over the bridge. We have a hunch that this is due to a bug in JSC object enumeration but did we not look into it further yet. Any help here is welcome. The JS code seems all right at first sight and shouldn't cause a segmentation crash. The workaround in this PR is to retrieve the keys first from the object and then looping over that array. In our app and in a reduced app test case this fixes the crash. If needed I can provide the reduced app test case. It's really tricky to make a test for this as it requires to be run Closes #11804 Differential Revision: D4403483 Pulled By: davidaurelio fbshipit-source-id: a31e5cff734e96bfec56e4a39dc1c6854798e245
- Loading branch information...
Showing with 6 additions and 2 deletions.