Closed Bug 949360 Opened 11 years ago Closed 11 years ago

Check for Image AllocateBuffer() failures

Categories

(Core :: Graphics: Layers, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla29
Tracking Status
firefox27 --- wontfix
firefox28 --- fixed
firefox29 --- fixed

People

(Reporter: cpeterson, Assigned: cpeterson)

References

Details

(Whiteboard: [qa-])

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
Attachment #8346423 - Flags: review?(nical.bugzilla)
Attachment #8346423 - Flags: review?(nical.bugzilla) → review+
Backed out because of mochitest-3 timeouts: http://hg.mozilla.org/integration/mozilla-inbound/rev/7631ae46b853 https://tbpl.mozilla.org/?tree=Mozilla-Inbound&rev=6d9cf51a012a Note that the WinXP mochitest-3 crashes were probably caused by bug 948777.
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla29
Comment on attachment 8346423 [details] [diff] [review] handle-AllocateBuffer-failure.patch [Approval Request Comment] Bug caused by (feature/regressing bug #): Not a regression, just some omitted error checks User impact if declined: No big problems. These error checks have been missing for a couple releases without causing any major problems. Testing completed (on m-c, etc.): m-c for one week Risk to taking this patch (and alternatives if risky): Low risk. It just adds a couple error checks for failed allocations of graphics buffer allocation. String or IDL/UUID changes made by this patch: None
Attachment #8346423 - Flags: approval-mozilla-aurora?
Attachment #8346423 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Whiteboard: [qa-]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: