From b0c827536938be65420ca909cc821eb098ccfc48 Mon Sep 17 00:00:00 2001 From: Valentin Shergin Date: Wed, 6 Feb 2019 16:12:45 -0800 Subject: [PATCH] Fabric: Lost comment in EventQueue Summary: Just a comment. Reviewed By: JoshuaGross Differential Revision: D13962465 fbshipit-source-id: 31780a8ccf02d768e3d4b91e7205ceb0ee10fedf --- ReactCommon/fabric/events/EventQueue.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ReactCommon/fabric/events/EventQueue.cpp b/ReactCommon/fabric/events/EventQueue.cpp index 01a9ef688..3eb775549 100644 --- a/ReactCommon/fabric/events/EventQueue.cpp +++ b/ReactCommon/fabric/events/EventQueue.cpp @@ -55,6 +55,9 @@ void EventQueue::onBeat(jsi::Runtime &runtime) const { } // No need to lock `EventEmitter::DispatchMutex()` here. + // The mutex protects from a situation when the `instanceHandle` can be + // deallocated during accessing, but that's impossible at this point because + // we have a strong pointer to it. for (const auto &event : queue) { if (event.eventTarget) { event.eventTarget->release(runtime);