mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Ensure correct instance for transaction telemetry
Summary: Ensures that transaction telemetry modified by transaction controller is the same as sent in the view callbacks. Changelog: [Internal] Reviewed By: cortinico, cipolleschi Differential Revision: D35827347 fbshipit-source-id: 123ae01d4a7fe1a9c97ebccae3ae248f7f2cf654
This commit is contained in:
committed by
Facebook GitHub Bot
parent
3a721f48b1
commit
fc1f5bbb92
@@ -30,7 +30,7 @@ ShadowViewMutationList MountingTransaction::getMutations() && {
|
||||
return std::move(mutations_);
|
||||
}
|
||||
|
||||
TransactionTelemetry const &MountingTransaction::getTelemetry() const {
|
||||
TransactionTelemetry &MountingTransaction::getTelemetry() const {
|
||||
return telemetry_;
|
||||
}
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ class MountingTransaction final {
|
||||
/*
|
||||
* Returns telemetry associated with this transaction.
|
||||
*/
|
||||
TransactionTelemetry const &getTelemetry() const;
|
||||
TransactionTelemetry &getTelemetry() const;
|
||||
|
||||
/*
|
||||
* Returns the id of the surface that the transaction belongs to.
|
||||
@@ -81,7 +81,7 @@ class MountingTransaction final {
|
||||
SurfaceId surfaceId_;
|
||||
Number number_;
|
||||
ShadowViewMutationList mutations_;
|
||||
TransactionTelemetry telemetry_;
|
||||
mutable TransactionTelemetry telemetry_;
|
||||
};
|
||||
|
||||
} // namespace react
|
||||
|
||||
@@ -27,7 +27,7 @@ bool TelemetryController::pullTransaction(
|
||||
|
||||
auto transaction = std::move(*optional);
|
||||
|
||||
auto telemetry = transaction.getTelemetry();
|
||||
auto &telemetry = transaction.getTelemetry();
|
||||
auto numberOfMutations = static_cast<int>(transaction.getMutations().size());
|
||||
|
||||
mutex_.lock();
|
||||
|
||||
Reference in New Issue
Block a user