mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
delete ShadowNodeFamily::instanceHandle_ (#41513)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/41513 changelog: [internal] Reviewed By: christophpurrer Differential Revision: D51394187 fbshipit-source-id: 3add711a3954ba16bf4524d47c3ed67473e2c0eb
This commit is contained in:
committed by
Facebook GitHub Bot
parent
f4e9827013
commit
a5d8ea4579
@@ -173,12 +173,7 @@ const SharedEventEmitter& ShadowNode::getEventEmitter() const {
|
||||
}
|
||||
|
||||
jsi::Value ShadowNode::getInstanceHandle(jsi::Runtime& runtime) const {
|
||||
auto instanceHandle = family_->instanceHandle_;
|
||||
if (instanceHandle == nullptr) {
|
||||
return jsi::Value::null();
|
||||
}
|
||||
|
||||
return instanceHandle->getInstanceHandle(runtime);
|
||||
return family_->eventEmitter_->getEventTarget()->getInstanceHandle(runtime);
|
||||
}
|
||||
|
||||
Tag ShadowNode::getTag() const {
|
||||
|
||||
@@ -26,7 +26,6 @@ ShadowNodeFamily::ShadowNodeFamily(
|
||||
: eventDispatcher_(std::move(eventDispatcher)),
|
||||
tag_(fragment.tag),
|
||||
surfaceId_(fragment.surfaceId),
|
||||
instanceHandle_(fragment.instanceHandle),
|
||||
eventEmitter_(std::move(eventEmitter)),
|
||||
componentDescriptor_(componentDescriptor),
|
||||
componentHandle_(componentDescriptor.getComponentHandle()),
|
||||
|
||||
@@ -132,11 +132,6 @@ class ShadowNodeFamily final {
|
||||
*/
|
||||
const SurfaceId surfaceId_;
|
||||
|
||||
/*
|
||||
* Weak reference to the React instance handle
|
||||
*/
|
||||
InstanceHandle::Shared const instanceHandle_;
|
||||
|
||||
/*
|
||||
* `EventEmitter` associated with all nodes of the family.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user