[fuchsia] Fix bad DCHECKs. (flutter/engine#33593)

We didn't catch these because the --unopt build was broken for about
a year and not well-tested.

The --unopt build was recently repaired in https://github.com/flutter/engine/pull/32502.
This commit is contained in:
Alexander Biggs
2022-05-24 13:56:21 -07:00
committed by GitHub
parent 2595546d1a
commit c99c1e532d
2 changed files with 4 additions and 4 deletions

View File

@@ -55,13 +55,13 @@ SoftwareSurfaceProducer::SoftwareSurfaceProducer(
sysmem_allocator_.NewRequest().TakeChannel().release());
sysmem_allocator_->SetDebugClientInfo(GetCurrentProcessName(),
GetCurrentProcessId());
FML_DCHECK(status != ZX_OK);
FML_DCHECK(status == ZX_OK);
if (!scenic_session_) {
status = fdio_service_connect(
"/svc/fuchsia.ui.composition.Allocator",
flatland_allocator_.NewRequest().TakeChannel().release());
FML_DCHECK(status != ZX_OK);
FML_DCHECK(status == ZX_OK);
}
valid_ = true;

View File

@@ -42,13 +42,13 @@ VulkanSurfacePool::VulkanSurfacePool(vulkan::VulkanProvider& vulkan_provider,
sysmem_allocator_.NewRequest().TakeChannel().release());
sysmem_allocator_->SetDebugClientInfo(GetCurrentProcessName(),
GetCurrentProcessId());
FML_DCHECK(status != ZX_OK);
FML_DCHECK(status == ZX_OK);
if (!scenic_session_) {
status = fdio_service_connect(
"/svc/fuchsia.ui.composition.Allocator",
flatland_allocator_.NewRequest().TakeChannel().release());
FML_DCHECK(status != ZX_OK);
FML_DCHECK(status == ZX_OK);
}
}