Fabric: Modernizing JSIInstallFabricUIManager
Summary: A bunch of different things was changed, but the most important (and need) change is that `UIManager` is now passed in the function as a regular reference, not as a `shared_ptr`. Besides that fact that passing this as `shared_ptr` is simply incorrect (because there is no ownership sharing/transferring here), we need this change because we cannot construct `shared_ptr` from `this` inside `UIManager` class (especially in the constructor). Besides that: * `const &` everything (correctness, explicit intention, performance); * Names were unified with the rest of the code; * `auto` everything; * All JSI stuff is now explicitly prefixed with `jsi::`; * `using` instead of `typedef` (modern C++ syntax); * Lamdas instead of std::bind (same perfromance, much more clear and flexible); Reviewed By: mdvacca Differential Revision: D9835901 fbshipit-source-id: 935be0ae889fe5508ffa9498282c939c816587e1
This commit is contained in:
parent
4120078b8a
commit
2a7bb12e84
|
@ -21,9 +21,8 @@ namespace react {
|
|||
class FabricUIManager;
|
||||
using UIManager = FabricUIManager;
|
||||
|
||||
using DispatchEventToEmptyTargetFunction = void (const EventHandler &eventHandler, std::string type, folly::dynamic payload);
|
||||
using DispatchEventToTargetFunction = void (const EventHandler &eventHandler, const EventTarget &eventTarget, std::string type, folly::dynamic payload);
|
||||
using ReleaseEventTargetFunction = void (EventTarget eventTarget);
|
||||
using DispatchEventToEmptyTargetFunction = void (const EventHandler &eventHandler, const std::string &type, const folly::dynamic &payload);
|
||||
using DispatchEventToTargetFunction = void (const EventHandler &eventHandler, const EventTarget &eventTarget, const std::string &type, const folly::dynamic &payload);
|
||||
|
||||
class FabricUIManager {
|
||||
public:
|
||||
|
|
Loading…
Reference in New Issue