Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add additional checks to prevent throwing native java errors in UIMan…
…agerBinding.cpp Summary: Right now there are places in UIManagerBinding.cpp where native java exceptions will be thrown if calling JSI functions results in errors, such as: ```Trying to report error getPropertyAsObject: property '__fbBatchedBridge' is undefined, expected an Object Error: getPropertyAsObject: property '__fbBatchedBridge' is undefined, expected an Object ``` https://www.internalfb.com/intern/logview/details/facebook_android_javascripterrors/358181062b47b9561e60427bbb3816a9 In this diff I added LOG(ERROR) and checks because: 1, Throwing errors neither prevents the JSI errors nor handles them properly, checks prevent JSI errors from happening. 2, Errors are aggregated in Logview with other JSI errors as "Error: android_crash:com.facebook.react.devsupport.JSException:facebook::jni::throwNewJavaException" which keeps the SLA task open forever, checks can prevent JSI errors so they won't lead to exceptions, and LOG(ERROR) will make sure we have enough info for debugging. Changelog: [General][Changed] - Add checks and logs to for better error handling Reviewed By: JoshuaGross Differential Revision: D26885562 fbshipit-source-id: c0c1c057342e9efc0ff708188703f4332036e7a9
- Loading branch information