react-native/Libraries
Albert Brand d2de604721 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 https://github.com/facebook/react-native/pull/11804

Differential Revision: D4403483

Pulled By: davidaurelio

fbshipit-source-id: a31e5cff734e96bfec56e4a39dc1c6854798e245
2017-01-11 08:58:30 -08:00
..
ART Better error for ART <Group /> 2016-12-07 17:13:42 -08:00
ActionSheetIOS Redo exported headers and include paths for opensource 2016-12-07 15:28:29 -08:00
AdSupport Redo exported headers and include paths for opensource 2016-12-07 15:28:29 -08:00
Alert Update AlertIOS.js 2017-01-09 15:28:31 -08:00
Animated Add more info link for warnedMissingNativeAnimated 2016-12-02 15:28:31 -08:00
AppState Remove deprecated APIs and modules 2016-10-11 07:43:52 -07:00
BatchedBridge Replace jest.resetModuleRegistry() with jest.resetModules() 2016-12-18 17:13:38 -08:00
BugReporting RN: Update React (2/2) 2016-11-04 05:43:44 -07:00
CameraRoll Add iOS permission information to CameraRoll.js 2016-12-22 17:13:31 -08:00
Components Add testID prop to Button component 2017-01-09 02:43:35 -08:00
Core fix babel 'strict mode' error 2016-12-11 00:43:30 -08:00
CustomComponents Add a prop to toggle ListView sticky section headers 2017-01-09 03:13:28 -08:00
DebugComponentHierarchy Move React Core Integration to a Dependency 2016-04-21 09:28:23 -07:00
EventEmitter RN: Cleanup OSS JS & Flow Declarations 2016-11-20 17:58:29 -08:00
Experimental update comment to reflect change in function name to renderQuickActions 2016-12-07 23:58:25 -08:00
Geolocation Redo exported headers and include paths for opensource 2016-12-07 15:28:29 -08:00
Image Typo in imageResizeMode getSize 2017-01-04 02:43:30 -08:00
Inspector Fix inspector overflow 2017-01-03 13:43:35 -08:00
Interaction Replace jest.resetModuleRegistry() with jest.resetModules() 2016-12-18 17:13:38 -08:00
JSInspector Add Network agent 2016-11-02 12:29:15 -07:00
LayoutAnimation Mention that LayoutAnimation has to be explicitly enabled on A… 2016-11-25 15:28:28 -08:00
Linking Auto-fix lint errors 2016-08-09 06:43:46 -07:00
LinkingIOS Redo exported headers and include paths for opensource 2016-12-07 15:28:29 -08:00
Modal Add property to force HW acceleration on Android for modal windows 2016-12-14 10:28:33 -08:00
NativeAnimation fix crash on reload during animation 2017-01-05 21:59:19 -08:00
NavigationExperimental fix typo 2016-12-15 21:13:38 -08:00
Network fix ios formdata boundary include slash 2016-12-14 08:28:42 -08:00
Performance fbsource 2016-12-13 18:58:34 -08:00
PermissionsAndroid Update PermissionsAndroid docs to use new APIs 2017-01-09 00:43:31 -08:00
PushNotificationIOS Redo exported headers and include paths for opensource 2016-12-07 15:28:29 -08:00
RCTTest Apple TV support 4: support for input (tvOS focus engine) 2016-12-19 06:28:40 -08:00
ReactNative Fix z-index of YellowBox 2017-01-09 00:28:37 -08:00
Renderer Add StyleSheet.setStyleAttributePreprocessor 2016-11-29 15:28:32 -08:00
Sample Update React Native minimum OS version to iOS8 2016-09-01 19:43:47 -07:00
Settings Redo exported headers and include paths for opensource 2016-12-07 15:28:29 -08:00
Share Update Share.js. Fixed bad grammar 2016-11-23 11:28:29 -08:00
Storage result in RCTAsyncStorage.multiGet could be null. 2016-12-15 22:43:30 -08:00
StyleSheet Add percentage support to react native 2017-01-11 03:58:37 -08:00
Text Add feature to use percentage as value unit 2017-01-02 05:28:30 -08:00
Utilities Android: fix JSC crash in dev 2017-01-11 08:58:30 -08:00
Vibration Redo exported headers and include paths for opensource 2016-12-07 15:28:29 -08:00
WebSocket Rename and merge files for RCTWebSocketObserver protocol 2016-12-08 07:44:37 -08:00
react-native RN: Cleanup OSS JS & Flow Declarations 2016-11-20 17:58:29 -08:00
vendor RN: Cleanup OSS JS & Flow Declarations 2016-11-20 17:58:29 -08:00
Promise.js Make onUnhandled safe for undefined errors 2016-08-02 07:58:28 -07:00
promiseRejectionIsError.js RN: Cleanup OSS JS & Flow Declarations 2016-11-20 17:58:29 -08:00