зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1771254 - Work around zero-sized shmems. r=jimb
Depends on D151703 Differential Revision: https://phabricator.services.mozilla.com/D152080
This commit is contained in:
Родитель
10ba2bff18
Коммит
c48f4c8b0c
|
@ -74,7 +74,11 @@ already_AddRefed<Buffer> Buffer::Create(Device* aDevice, RawId aDeviceId,
|
|||
aRv.ThrowRangeError("Mappable size is too large");
|
||||
return nullptr;
|
||||
}
|
||||
const auto& size = checked.value();
|
||||
size_t size = checked.value();
|
||||
if (size == 0) {
|
||||
// Can't send zero-sized shmems.
|
||||
size = 1;
|
||||
}
|
||||
|
||||
if (!actor->AllocUnsafeShmem(size, &shmem)) {
|
||||
aRv.ThrowAbortError(
|
||||
|
|
Загрузка…
Ссылка в новой задаче