Fabric: Making EventBeat::beat protected member

Summary:
The documentation for the method says that it must be called from a subclass, but the methods wasn't marked as protected.

Calling `beat` directly will bypass custom logic implemented in subclasses (because it's not a virtual function (by-design)). That's practically what happened before and what the previous diffs in the stack fix.

Changelog: [Internal]

Reviewed By: JoshuaGross

Differential Revision: D18339594

fbshipit-source-id: 3d8c53b69e1b72d447714dd91c9392bdfb05b9ae
This commit is contained in:
Valentin Shergin
2019-11-07 09:43:07 -08:00
committed by Facebook Github Bot
parent 9883da167b
commit d04e03ffb8
+1 -1
View File
@@ -75,13 +75,13 @@ class EventBeat {
*/
void setBeatCallback(const BeatCallback &beatCallback);
protected:
/*
* Should be used by sublasses to send a beat.
* Receiver might ignore the call if a beat was not requested.
*/
void beat(jsi::Runtime &runtime) const;
protected:
BeatCallback beatCallback_;
SharedOwnerBox ownerBox_;
mutable std::atomic<bool> isRequested_{false};