Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Event Log] Log ASM flag when modify subnodes #trivial #379

Merged
merged 2 commits into from
Jun 22, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 12 additions & 18 deletions Source/ASDisplayNode.mm
Original file line number Diff line number Diff line change
Expand Up @@ -2006,9 +2006,8 @@ - (void)_insertSubnodeSubviewOrSublayer:(ASDisplayNode *)subnode atIndex:(NSInte

- (void)addSubnode:(ASDisplayNode *)subnode
{
ASDisplayNodeLogEvent(self, @"addSubnode: %@", subnode);
// TODO: 2.0 Conversion: Reenable and fix within product code
//ASDisplayNodeAssert(self.automaticallyManagesSubnodes == NO, @"Attempt to manually add subnode to node with automaticallyManagesSubnodes=YES. Node: %@", subnode);
ASDisplayNodeLogEvent(self, @"addSubnode: %@ with automaticallyManagesSubnodes: %@",
subnode, self.automaticallyManagesSubnodes ? @"YES" : @"NO");
[self _addSubnode:subnode];
}

Expand Down Expand Up @@ -2058,9 +2057,8 @@ - (void)_addSubnodeSubviewOrSublayer:(ASDisplayNode *)subnode

- (void)replaceSubnode:(ASDisplayNode *)oldSubnode withSubnode:(ASDisplayNode *)replacementSubnode
{
ASDisplayNodeLogEvent(self, @"replaceSubnode: %@ withSubnode:%@", oldSubnode, replacementSubnode);
// TODO: 2.0 Conversion: Reenable and fix within product code
//ASDisplayNodeAssert(self.automaticallyManagesSubnodes == NO, @"Attempt to manually replace old node with replacement node to node with automaticallyManagesSubnodes=YES. Old Node: %@, replacement node: %@", oldSubnode, replacementSubnode);
ASDisplayNodeLogEvent(self, @"replaceSubnode: %@ withSubnode: %@ with automaticallyManagesSubnodes: %@",
oldSubnode, replacementSubnode, self.automaticallyManagesSubnodes ? @"YES" : @"NO");
[self _replaceSubnode:oldSubnode withSubnode:replacementSubnode];
}

Expand Down Expand Up @@ -2106,9 +2104,8 @@ - (void)_replaceSubnode:(ASDisplayNode *)oldSubnode withSubnode:(ASDisplayNode *

- (void)insertSubnode:(ASDisplayNode *)subnode belowSubnode:(ASDisplayNode *)below
{
ASDisplayNodeLogEvent(self, @"insertSubnode: %@ belowSubnode:%@", subnode, below);
// TODO: 2.0 Conversion: Reenable and fix within product code
//ASDisplayNodeAssert(self.automaticallyManagesSubnodes == NO, @"Attempt to manually insert subnode to node with automaticallyManagesSubnodes=YES. Node: %@", subnode);
ASDisplayNodeLogEvent(self, @"insertSubnode: %@ belowSubnode: %@ with automaticallyManagesSubnodes: %@",
subnode, below, self.automaticallyManagesSubnodes ? @"YES" : @"NO");
[self _insertSubnode:subnode belowSubnode:below];
}

Expand Down Expand Up @@ -2170,9 +2167,8 @@ - (void)_insertSubnode:(ASDisplayNode *)subnode belowSubnode:(ASDisplayNode *)be

- (void)insertSubnode:(ASDisplayNode *)subnode aboveSubnode:(ASDisplayNode *)above
{
ASDisplayNodeLogEvent(self, @"insertSubnode: %@ abodeSubnode: %@", subnode, above);
// TODO: 2.0 Conversion: Reenable and fix within product code
//ASDisplayNodeAssert(self.automaticallyManagesSubnodes == NO, @"Attempt to manually insert subnode to node with automaticallyManagesSubnodes=YES. Node: %@", subnode);
ASDisplayNodeLogEvent(self, @"insertSubnode: %@ abodeSubnode: %@ with automaticallyManagesSubnodes: %@",
subnode, above, self.automaticallyManagesSubnodes ? @"YES" : @"NO");
[self _insertSubnode:subnode aboveSubnode:above];
}

Expand Down Expand Up @@ -2232,9 +2228,8 @@ - (void)_insertSubnode:(ASDisplayNode *)subnode aboveSubnode:(ASDisplayNode *)ab

- (void)insertSubnode:(ASDisplayNode *)subnode atIndex:(NSInteger)idx
{
ASDisplayNodeLogEvent(self, @"insertSubnode: %@ atIndex: %td", subnode, idx);
// TODO: 2.0 Conversion: Reenable and fix within product code
//ASDisplayNodeAssert(self.automaticallyManagesSubnodes == NO, @"Attempt to manually insert subnode to node with automaticallyManagesSubnodes=YES. Node: %@", subnode);
ASDisplayNodeLogEvent(self, @"insertSubnode: %@ atIndex: %td with automaticallyManagesSubnodes: %@",
subnode, idx, self.automaticallyManagesSubnodes ? @"YES" : @"NO");
[self _insertSubnode:subnode atIndex:idx];
}

Expand Down Expand Up @@ -2295,9 +2290,8 @@ - (void)_removeSubnode:(ASDisplayNode *)subnode

- (void)removeFromSupernode
{
// TODO: 2.0 Conversion: Reenable and fix within product code
//ASDisplayNodeAssert(self.supernode.automaticallyManagesSubnodes == NO, @"Attempt to manually remove subnode from node with automaticallyManagesSubnodes=YES. Node: %@", self);

ASDisplayNodeLogEvent(self, @"removeFromSupernode with automaticallyManagesSubnodes: %@",
self.automaticallyManagesSubnodes ? @"YES" : @"NO");
[self _removeFromSupernode];
}

Expand Down