Check for Image AllocateBuffer() failures

RESOLVED DUPLICATE of bug 949360

Status

()

Core
Graphics: Layers
RESOLVED DUPLICATE of bug 949360
4 years ago
4 years ago

People

(Reporter: cpeterson, Assigned: cpeterson)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

4 years ago
This patch began as a fix for a warning that local variable `status` was unused in release builds:

gfx/layers/ipc/SharedPlanarYCbCrImage.cpp:133:8 [-Wunused-variable] unused variable 'status'

But then I saw that a couple Image functions did not check whether AllocateBuffer() returned null. This patch checks for AllocateBuffer() returning null and also avoids setting mBufferSize to a non-zero size when mBuffer is null.

Green try run:
https://tbpl.mozilla.org/?tree=Try&rev=1598ed0935bc
(Assignee)

Updated

4 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 949360
You need to log in before you can comment on or make changes to this bug.