Serializer: fix false negative in hashmap lookups.
authoryangguo <yangguo@chromium.org>
Wed, 4 Mar 2015 15:36:02 +0000 (07:36 -0800)
committerCommit bot <commit-bot@chromium.org>
Wed, 4 Mar 2015 15:36:07 +0000 (15:36 +0000)
commitdbecf20d65460a2856563b46f6f0267805cae64f
tree28de59e2b2dcefc26e7d2c965ff4626aa8fffad0
parent8d2e45669f84076e95131503ea623f32483b3a7d
Serializer: fix false negative in hashmap lookups.

If we use HashMap::Lookup with insert=true, the returned entry may have
NULL as value. This could either mean that the value is 0, or that the
entry has just been inserted. This ambiguity can cause false negatives
in PartialCacheIndexMap::LookupOrInsert.

Also fix a TODO.

R=vogelheim@chromium.org

Review URL: https://codereview.chromium.org/974273002

Cr-Commit-Position: refs/heads/master@{#26994}
src/serialize.cc
src/serialize.h