Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make mHybridData thread safe for EventEmitterWrapper
Summary: In T94154173, when calling ```EventEmitterWrapper->invoke()```, hybrid function ```invokeEvent``` is null, even if we checked that ```mHybridData``` is valid before calling ```invokeEvent```. **Theory:** ```invoke()``` is called from ```mqt_js``` thread, ```desotry()``` is called from ```main``` thread, which cause multi-thread access of```mHybridData```. So if ```desotry()``` is called after ```isValid()``` check and before calling ```invokeEvent()```, ```invokeEvent``` could be destroyed and is null. I can reproduce with above theory: {F633411001} **Fix:** Make functions synchronized so ```mHybridData``` can be thread safe. Changelog: [Android][Fixed] - Make mHybridData thread safe Reviewed By: RSNara Differential Revision: D29792453 fbshipit-source-id: 8b4c754d53ece933be7b2cf99c6cd026b39e24ad
- Loading branch information