Commit bd9968d8 authored by Khushal's avatar Khushal Committed by Commit Bot

gpu: Handle failure to allocate shm for transfer cache entries.

R=ericrk@chromium.org

Bug: 866434
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel
Change-Id: I453b7fa115932366f9e6210bc6404d05358adb67
Reviewed-on: https://chromium-review.googlesource.com/1147102Reviewed-by: default avatarEric Karl <ericrk@chromium.org>
Commit-Queue: Khushal <khushalsagar@chromium.org>
Cr-Commit-Position: refs/heads/master@{#577302}
parent b07132cf
...@@ -103,8 +103,9 @@ class TransferCacheSerializeHelperImpl ...@@ -103,8 +103,9 @@ class TransferCacheSerializeHelperImpl
void CreateEntryInternal(const cc::ClientTransferCacheEntry& entry) final { void CreateEntryInternal(const cc::ClientTransferCacheEntry& entry) final {
size_t size = entry.SerializedSize(); size_t size = entry.SerializedSize();
void* data = support_->MapTransferCacheEntry(size); void* data = support_->MapTransferCacheEntry(size);
// TODO(piman): handle error (failed to allocate/map shm) if (!data)
DCHECK(data); return;
bool succeeded = entry.Serialize( bool succeeded = entry.Serialize(
base::make_span(reinterpret_cast<uint8_t*>(data), size)); base::make_span(reinterpret_cast<uint8_t*>(data), size));
DCHECK(succeeded); DCHECK(succeeded);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment