Skip to content

Commit

Permalink
delete ShadowNodeFamily::instanceHandle_ (#41513)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #41513

changelog: [internal]

Reviewed By: christophpurrer

Differential Revision: D51394187

fbshipit-source-id: 3add711a3954ba16bf4524d47c3ed67473e2c0eb
  • Loading branch information
sammy-SC authored and facebook-github-bot committed Nov 17, 2023
1 parent f4e9827 commit a5d8ea4
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down

0 comments on commit a5d8ea4

Please sign in to comment.