react-native/React
makadaw 5e97be8b1c Fix data race on read/write _instance variable in ModuleData class
Summary:
Thanks for submitting a PR! Please read these instructions carefully:

- [ ] Explain the **motivation** for making this change.
- [ ] Provide a **test plan** demonstrating that the code is solid.
- [ ] Match the **code formatting** of the rest of the codebase.
- [ ] Target the `master` branch, NOT a "stable" branch.

What existing problem does the pull request solve?
XCode  [Thread Sanitizer](https://clang.llvm.org/docs/ThreadSanitizer.html) find race condition while read/write `_instance` variable in RCTModuleData class. A bridge can check `hasInstance` method while instance writes.

All tests passed on my device.
These changes remove data race, you can turn it in scheme configuration ![](https://www.shinobicontrols.com/wp-content/uploads/2016/08/Enable_Sanitizer.png)
Closes https://github.com/facebook/react-native/pull/13757

Differential Revision: D4994041

Pulled By: javache

fbshipit-source-id: 631cd59bbcbde193937d8baf8358ff6868717a2e
2017-05-24 13:01:00 -07:00
..
Base Fix data race on read/write _instance variable in ModuleData class 2017-05-24 13:01:00 -07:00
CxxBridge Provide sync vs async interface for bundle loading via parameter 2017-05-24 07:31:36 -07:00
CxxModule Improve systrace markers 2017-05-12 18:07:49 -07:00
CxxUtils Explicitly cast to (bool) where needed on objc with folly::dynamic 2017-04-18 15:36:20 -07:00
DevSupport Fix packager reload command not working 2017-05-15 10:30:36 -07:00
Executors Remove RCTBatchedBridge rule and all uses from the tree 2017-04-19 17:00:43 -07:00
Modules Introducing `-[RCTUIManager shadowViewForReactTag:]` 2017-05-16 09:46:53 -07:00
Profiler Fix memory leak in RN fbsystrace support 2017-05-15 03:47:15 -07:00
React.xcodeproj Move packager launcher scripts outside of `packager/` 2017-05-23 16:17:09 -07:00
ReactLegacy.xcodeproj Move packager launcher scripts outside of `packager/` 2017-05-23 16:17:09 -07:00
Views Update RCTScrollView.m 2017-05-24 11:45:46 -07:00
third-party.xcconfig More attempts to fix Travis CI runs 2017-05-10 04:32:54 -07:00