Shmem allocation functions should return Maybe<Shmem> instead of a boolean.

NEW
Unassigned

Status

()

Core
Graphics: Layers
P3
normal
a year ago
9 months ago

People

(Reporter: nical, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: gfx-noted)

(Reporter)

Description

a year ago
..or the function should be annotated so that the build fails if it returns false. I have a preference towards using Maybe<T>. Anyway, there's a tendency to ignore the result of ShmemAllocator::AllocShmem and friends which can lead to pretty awful things.
(Reporter)

Comment 1

a year ago
(In reply to Nicolas Silva [:nical] from comment #0)
> [...] so that the build fails if it returns false.

I meant if the return value is ignored.
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.