mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Print ShadowView hash when displaying instructions
Summary: When displaying instructions in debug logs, also print ShadowView hash to make it easier to reconstruct a series of events. Changelog: [Internal] Reviewed By: mdvacca Differential Revision: D27492938 fbshipit-source-id: 276a080a4afcfb4aa0aafc215e2ccd56ef849fcf
This commit is contained in:
committed by
Facebook GitHub Bot
parent
638e788e06
commit
e9ff6d8bca
@@ -60,8 +60,19 @@ static std::string GetMutationInstructionString(
|
||||
void PrintMutationInstruction(
|
||||
std::string message,
|
||||
ShadowViewMutation const &mutation) {
|
||||
LOG(ERROR) << message
|
||||
<< " Mutation: " << GetMutationInstructionString(mutation);
|
||||
[&](std::ostream &stream) -> std::ostream & {
|
||||
stream << message
|
||||
<< " Mutation: " << GetMutationInstructionString(mutation);
|
||||
if (mutation.oldChildShadowView.tag != 0) {
|
||||
stream << " old hash: ##"
|
||||
<< std::hash<ShadowView>{}(mutation.oldChildShadowView);
|
||||
}
|
||||
if (mutation.newChildShadowView.tag != 0) {
|
||||
stream << " new hash: ##"
|
||||
<< std::hash<ShadowView>{}(mutation.newChildShadowView);
|
||||
}
|
||||
return stream;
|
||||
}(LOG(ERROR));
|
||||
}
|
||||
void PrintMutationInstructionRelative(
|
||||
std::string message,
|
||||
|
||||
Reference in New Issue
Block a user