The SVG code should check gfxASurface::CairoStatus() when it creates new surfaces

RESOLVED FIXED

Status

()

Core
SVG
RESOLVED FIXED
11 years ago
11 years ago

People

(Reporter: jwatt, Assigned: longsonr)

Tracking

Trunk
Points:
---
Bug Flags:
in-testsuite -

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

We have a number of places in the SVG code where we create new surfaces and just assume no problems will have occurred. We should check for gfxFooSurface constructor failure by calling gfxASurface::CairoStatus() on new surfaces before we use them.
Bah. Now that I actually _look_ we do at least check Data(). (Could have sworn I saw code without checks before.)

http://mxr.mozilla.org/seamonkey/search?string=new+gfx&find=svg&findi=&filter=&tree=seamonkey

Maybe we should be checking CairoStatus() instead.
(Assignee)

Comment 2

11 years ago
Created attachment 270299 [details] [diff] [review]
patch

(In reply to comment #1)
> Bah. Now that I actually _look_ we do at least check Data(). (Could have sworn
> I saw code without checks before.)
> 

You would have done, patches sorted this out as they went along ;-).
Assignee: nobody → longsonr
Status: NEW → ASSIGNED
Attachment #270299 - Flags: review?(jwatt)
Comment on attachment 270299 [details] [diff] [review]
patch

Thanks. I'm not sure about the assertion in nsSVGUtils.cpp. I think we should really be looking at handling failure there rather than saying it can never happen. I guess that's a separate bug though. r=jwatt
Attachment #270299 - Flags: review?(jwatt) → review+
(Assignee)

Updated

11 years ago
Attachment #270299 - Flags: superreview?(tor)

Updated

11 years ago
Attachment #270299 - Flags: superreview?(tor) → superreview+
(Assignee)

Comment 4

11 years ago
checked in.
Status: ASSIGNED → RESOLVED
Last Resolved: 11 years ago
Resolution: --- → FIXED

Updated

11 years ago
Flags: in-testsuite-
You need to log in before you can comment on or make changes to this bug.