Skip to content

Commit

Permalink
fix: extra child traversal in collectDirtyChildren to cause app to ha…
Browse files Browse the repository at this point in the history
…ng when saving object with many pointers
  • Loading branch information
shlusiak committed Jun 26, 2023
1 parent 2fb0259 commit d7625ba
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Parse/Parse/Source/PFObject.m
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ + (BFTask *)_enqueue:(BFTask *(^)(BFTask *toAwait))taskStart forObjects:(NSArray
+ (BOOL)collectDirtyChildren:(id)node
children:(NSMutableSet *)dirtyChildren
files:(NSMutableSet *)dirtyFiles
seen:(NSSet *)seen
seen:(NSMutableSet *)seen
seenNew:(NSSet *)seenNew
currentUser:(PFUser *)currentUser
error:(NSError * __autoreleasing *)error {
Expand Down Expand Up @@ -292,7 +292,7 @@ + (BOOL)collectDirtyChildren:(id)node
if ([seen containsObject:object]) {
return YES;
}
seen = [seen setByAddingObject:object];
[seen addObject:object];

// Recurse into this object's children looking for dirty children.
// We only need to look at the child object's current estimated data,
Expand Down Expand Up @@ -334,7 +334,7 @@ + (BOOL)collectDirtyChildren:(id)child
return [self collectDirtyChildren:child
children:dirtyChildren
files:dirtyFiles
seen:[NSSet set]
seen:[NSMutableSet set]
seenNew:[NSSet set]
currentUser:currentUser
error:error];
Expand Down

0 comments on commit d7625ba

Please sign in to comment.