• stanisc's avatar
    Sync: support implicit permanent folders in commits. · 8d56b3a9
    stanisc authored
    Traversal::AddUncommittedParentsAndTheirPredecessors walks the
    hierarchy to sort commits which is not necessary for any types
    except bookmarks.
    We've seen some crashes here when implicit permanent folders
    were turned on alpha server. I reproduced the crash by planting
    an empty parent ID in the database.
    
    The fix avoids traversing the hierarchy for committed items with
    unset parent IDs. Verified that this has stopped the crash
    locally and successfully committed the item.
    
    BUG=438313
    
    Review URL: https://codereview.chromium.org/1023843002
    
    Cr-Commit-Position: refs/heads/master@{#321472}
    8d56b3a9
directory_commit_contribution_unittest.cc 18.4 KB