Don't leak buffers if MapAtCreation fails.

This required changing DeviceBase::CreateBufferImpl to return
ResultOrError<Ref<BufferBase>>

Bug: chromium:1103154
Change-Id: I1a5811d293333b6ef29c988a08f2f1f84ac65702
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/24500
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
This commit is contained in:
Corentin Wallez
2020-07-08 19:45:40 +00:00
committed by Commit Bot service account
parent 519edd5890
commit 8a9919980f
17 changed files with 36 additions and 28 deletions

View File

@@ -75,4 +75,4 @@ void RefCounted::Release() {
void RefCounted::DeleteThis() {
delete this;
}
}