Index: sync/internal_api/change_reorder_buffer.cc |
diff --git a/sync/internal_api/change_reorder_buffer.cc b/sync/internal_api/change_reorder_buffer.cc |
index 51883092892c356d725f2f46212926cc23a16438..523fb8d38aec64ae1ff22e1aa71619894f0e8fd1 100644 |
--- a/sync/internal_api/change_reorder_buffer.cc |
+++ b/sync/internal_api/change_reorder_buffer.cc |
@@ -200,12 +200,7 @@ bool ChangeReorderBuffer::GetAllChangesInTreeOrder( |
// There were ordering changes on the children of this parent, so |
// enumerate all the children in the sibling order. |
syncable::Entry parent(trans, syncable::GET_BY_HANDLE, next); |
- syncable::Id id; |
- if (!trans->directory()->GetFirstChildId( |
- trans, parent.Get(syncable::ID), &id)) { |
- *changes = ImmutableChangeRecordList(); |
- return false; |
- } |
+ syncable::Id id = parent.GetFirstChildId(); |
while (!id.IsRoot()) { |
syncable::Entry child(trans, syncable::GET_BY_ID, id); |
CHECK(child.good()); |
@@ -216,7 +211,7 @@ bool ChangeReorderBuffer::GetAllChangesInTreeOrder( |
// ordering. |
if (operations_.find(handle) == operations_.end()) |
operations_[handle] = OP_UPDATE_POSITION_AND_PROPERTIES; |
- id = child.Get(syncable::NEXT_ID); |
+ id = child.GetSuccessorId(); |
} |
} |
} |