react-native-macos/ReactCommon/fabric/events
Valentin Shergin c25d5948a5 Fabric: Exposing EventEmitter's ownership model as a shared_ptr
Summary:
As we did in the previous diff, here we implemented `EventEmitter`'s ownership model as a `shared_ptr`. This change fixes problem with leaking `WeakObject`s which happens on hot-reload.

So, in short:
 * `EventTargetWrapper` object owns `jsi::WeakObject` that can be converted to actual `jsi::Object` that represent event target in JavaScript realm;
 * `EventTargetWrapper` and `jsi::WeakObject` objects must be deallocated as soon as native part does not need them anymore;
 * `EventEmitter` objects retain `EventTarget` objects;
 * `EventEmitter` can loose event target object in case if assosiated `ShadowNode` got unmounted (not deallocated); in this case `EventEmitter` is loosing possibility to dispatch event even if some mounting-layer code is still retaining it.

Reviewed By: mdvacca

Differential Revision: D9762755

fbshipit-source-id: 96e989767a32914db9f4627fce51b044c71f257a
2018-09-13 23:02:37 -07:00
..
tests Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
BUCK Fixup references to old flag_defs.bzl in xplat/ 2018-09-11 18:47:30 -07:00
BatchedEventQueue.cpp Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
BatchedEventQueue.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
EventBeat.cpp Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
EventBeat.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
EventDispatcher.cpp Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
EventDispatcher.h Fabric: Exposing EventEmitter's ownership model as a shared_ptr 2018-09-13 23:02:37 -07:00
EventEmitter.cpp Fabric: Exposing EventEmitter's ownership model as a shared_ptr 2018-09-13 23:02:37 -07:00
EventEmitter.h Fabric: Exposing EventEmitter's ownership model as a shared_ptr 2018-09-13 23:02:37 -07:00
EventQueue.cpp Fabric: Exposing EventEmitter's ownership model as a shared_ptr 2018-09-13 23:02:37 -07:00
EventQueue.h Fabric: Exposing EventEmitter's ownership model as a shared_ptr 2018-09-13 23:02:37 -07:00
RawEvent.cpp Fabric: Exposing EventEmitter's ownership model as a shared_ptr 2018-09-13 23:02:37 -07:00
RawEvent.h Fabric: Exposing EventEmitter's ownership model as a shared_ptr 2018-09-13 23:02:37 -07:00
UnbatchedEventQueue.cpp Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
UnbatchedEventQueue.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
primitives.h Fabric: Exposing EventEmitter's ownership model as a shared_ptr 2018-09-13 23:02:37 -07:00