react-native-macos/Libraries/polyfills
Spencer Ahrens d7cbe3347b protect against hanging when logging nasty objects
Summary:
Logging nasty objects can cause RN to lockup as we try to format it nicely. The formatting code has some safegaurds against excessive recursion and some cycles, but it's not failsafe.

This adds a limit on the total number of times format can be called before we start to bail out. In my testing, this limit keeps the format time under ~100ms for huge objects, and logcat and other log readers start truncating it anyway so there is rarely any lost information.

I also considered using wall time, but this seemed a little cleaner. Open to suggestions.

Reviewed By: yungsters

Differential Revision: D15710157

fbshipit-source-id: b50261093270d6fb67b3473432d384ec51b98fd5
2019-06-21 07:43:52 -07:00
..
__tests__ Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
Object.es7.js Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
console.js protect against hanging when logging nasty objects 2019-06-21 07:43:52 -07:00
error-guard.js Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00