Serialize read/write operations corresponding to a key in GeneratedCodeCache

Since read and write involves multiple operations (for ex: open entry,
create entry, write data) it is possible that these operations overlap
and we may read an incomplete entry. Hence it is safer to serialize
the operations at the GeneratedCodeCache layer.

Bug: 886892
Change-Id: Idc26079b6e3d4682a030b9ba04b11c624119dad4
Reviewed-on: https://chromium-review.googlesource.com/c/1398085
Commit-Queue: Mythri Alle <mythria@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Maks Orlovich <morlovich@chromium.org>
Cr-Commit-Position: refs/heads/master@{#623676}
3 files changed