mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-17 12:19:12 +08:00
Fabric: Fixed incorrect systrace marker in UIManagerBinding::dispatchEvent
Summary: `SystraceSection` relies on RAII, so previously it measured only `if (eventTarget) {`'s body.
Reviewed By: mdvacca
Differential Revision: D13123047
fbshipit-source-id: 463fba783763f694b51325f98314d36b7da2f887
This commit is contained in:
committed by
Facebook Github Bot
parent
7197aa026b
commit
106de1201b
@@ -68,10 +68,11 @@ void UIManagerBinding::dispatchEvent(
|
||||
const EventTarget *eventTarget,
|
||||
const std::string &type,
|
||||
const folly::dynamic &payload) const {
|
||||
SystraceSection s("UIManagerBinding::dispatchEvent");
|
||||
|
||||
auto eventTargetValue = jsi::Value::null();
|
||||
|
||||
if (eventTarget) {
|
||||
SystraceSection s("UIManagerBinding::JSIDispatchFabricEventToTarget");
|
||||
auto &eventTargetWrapper =
|
||||
static_cast<const EventTargetWrapper &>(*eventTarget);
|
||||
eventTargetValue = eventTargetWrapper.instanceHandle.lock(runtime);
|
||||
|
||||
Reference in New Issue
Block a user