-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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
[RCTLog] Use getters and setters #2494
Conversation
I'd avoid creating a class just to hook in on load. Putting the dispatch_once in load is not very useful either, since it will only be executed when the program is getting read into memory. The timing would actually be very similar to If possible, I'd try to insert this dispatch_once wherever we try to use the default log function (not everything is going to the accessor method right now, so that would need to be changed. Looking forward to hearing whether this change helps fixing the crash in production. |
@javache Yes, that is exactly my goal at the moment. To avoid using the Let's see if this fixes our crashes. Will update. |
ffbaf7a
to
12d7cc6
Compare
@javache I have rethought these changes based on your comments and updated PR. Please do share feedback. There is no constructor now - it simply uses the existing getters and setters. |
@facebook-github-bot import |
Thanks @javache. |
b998e5a
Our crashes are resolved. Thanks @javache for your help. |
Summary: As per discussion in facebook#2423 - possible fix for crash. (cc: @javache) Please share feedback regarding the PR, we are going to be using this diff in production to see if it fixes the crashes we are seeing. (fixes facebook#2423) Closes facebook#2494 Reviewed By: @javache Differential Revision: D2433515 Pulled By: @nicklockwood
As per discussion in #2423 - possible fix for crash. (cc: @javache)
Please share feedback regarding the PR, we are going to be using this diff in production to see if it fixes the crashes we are seeing.
(fixes #2423)