mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Add logging to detect inconsistencies with peeked/polled animation operations
Summary: Just trying something out. Changelog: [Internal] Reviewed By: ShikaSD Differential Revision: D34369919 fbshipit-source-id: 236f886fcc000a444bad494fd738688425159f21
This commit is contained in:
committed by
Facebook GitHub Bot
parent
05b4570d3f
commit
7a3e6ae48f
@@ -252,6 +252,15 @@ public class NativeAnimatedModule extends NativeAnimatedModuleSpec
|
||||
// won't cause any errors to execute it earlier than expected (just a bit of UI jank at worst)
|
||||
// so we just continue happily along.
|
||||
UIThreadOperation polledOperation = operationQueue.poll();
|
||||
if (peekedOperation != polledOperation) {
|
||||
ReactSoftExceptionLogger.logSoftException(
|
||||
NAME,
|
||||
new RuntimeException(
|
||||
"Inconsistency detected: peeked animation operation different from polled: "
|
||||
+ peekedOperation
|
||||
+ " / "
|
||||
+ polledOperation));
|
||||
}
|
||||
if (polledOperation == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user