summaryrefslogtreecommitdiffstats
path: root/sync/syncable/directory.cc
diff options
context:
space:
mode:
authorgangwu <gangwu@chromium.org>2015-07-06 15:51:54 -0700
committerCommit bot <commit-bot@chromium.org>2015-07-06 22:52:20 +0000
commit87f0414d9c4e44bb5369538ce292bef1ccb71b89 (patch)
tree57899dd57f2b4a444a335e68a6a6652b5ac2c9df /sync/syncable/directory.cc
parent2ded6897cf01c9335ba31722912b20ff25949a05 (diff)
downloadchromium_src-87f0414d9c4e44bb5369538ce292bef1ccb71b89.zip
chromium_src-87f0414d9c4e44bb5369538ce292bef1ccb71b89.tar.gz
chromium_src-87f0414d9c4e44bb5369538ce292bef1ccb71b89.tar.bz2
Replace DCHECK with CHECK.
In the bug 332371, position "successor" is empty and cause UniquePosition::Between call crashes later. So for getting more crash dump info, we make this change to let crash earlier(it will crash anyway later). BUG=332371 Review URL: https://codereview.chromium.org/1206313003 Cr-Commit-Position: refs/heads/master@{#337505}
Diffstat (limited to 'sync/syncable/directory.cc')
-rw-r--r--sync/syncable/directory.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/sync/syncable/directory.cc b/sync/syncable/directory.cc
index e23065b..720a924 100644
--- a/sync/syncable/directory.cc
+++ b/sync/syncable/directory.cc
@@ -1467,7 +1467,9 @@ void Directory::PutPredecessor(EntryKernel* e, EntryKernel* predecessor) {
// Another mixed valid and invalid position case. This one could be supported
// in theory, but we're trying to deprecate support for siblings with and
// without valid positions. See TODO above.
- DCHECK(successor->ref(UNIQUE_POSITION).IsValid());
+ // Using a release CHECK here because the following UniquePosition::Between
+ // call crashes anyway when the position string is empty (see crbug/332371).
+ CHECK(successor->ref(UNIQUE_POSITION).IsValid());
// Finally, the normal case: inserting between two elements.
UniquePosition pos = UniquePosition::Between(