Closed Bug 949359 Opened 11 years ago Closed 11 years ago

Check for Image AllocateBuffer() failures

Categories

(Core :: Graphics: Layers, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 949360

People

(Reporter: cpeterson, Assigned: cpeterson)

Details

Attachments

(1 file)

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
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: