Skip to content
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
22 changes: 12 additions & 10 deletions Parse/PFObject.m
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,7 @@ + (void)collectDirtyChildren:(id)node

} else if ([node isKindOfClass:[PFObject class]]) {
PFObject *object = (PFObject *)node;
NSDictionary *toSearch = nil;

@synchronized ([object lock]) {
// Check for cycles of new objects. Any such cycle means it will be
Expand All @@ -288,18 +289,19 @@ + (void)collectDirtyChildren:(id)node
// Recurse into this object's children looking for dirty children.
// We only need to look at the child object's current estimated data,
// because that's the only data that might need to be saved now.
[self collectDirtyChildren:object->_estimatedData.dictionaryRepresentation
children:dirtyChildren
files:dirtyFiles
seen:seen
seenNew:seenNew
currentUser:currentUser];

if ([object isDirty:NO]) {
[dirtyChildren addObject:object];
}
toSearch = [object->_estimatedData.dictionaryRepresentation copy];
}

[self collectDirtyChildren:toSearch
children:dirtyChildren
files:dirtyFiles
seen:seen
seenNew:seenNew
currentUser:currentUser];

if ([object isDirty:NO]) {
[dirtyChildren addObject:object];
}
} else if ([node isKindOfClass:[PFFile class]]) {
PFFile *file = (PFFile *)node;
if (!file.url) {
Expand Down