Leak when an image needs CORS and the nsCORSListenerProxy constructor fails

RESOLVED FIXED in mozilla13

Status

()

Core
ImageLib
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: bz, Assigned: bz)

Tracking

Trunk
mozilla13
x86
Mac OS X
Points:
---
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

I ran into this by accident when I triggered CORS on some data: images when it should not have been happening.

Minimal leaking testcase:

  <img crossorigin src="data:a/a,">

What happens here is that we get to the nsCORSListenerProxy constructor in LoadImage, that errors out and we return.  But we already have a cycle between the imgRequest and the imgCacheEntry at that point, so we lose.

Patch coming up.
Created attachment 602255 [details] [diff] [review]
Fix leaks on CORS failures in imagelib.
Attachment #602255 - Flags: review?(joe)
Assignee: nobody → bzbarsky
Whiteboard: [need review]
Attachment #602255 - Flags: review?(joe) → review+
http://hg.mozilla.org/integration/mozilla-inbound/rev/180aae8f8d2d
Flags: in-testsuite+
Whiteboard: [need review]
Target Milestone: --- → mozilla13

Comment 3

6 years ago
https://hg.mozilla.org/mozilla-central/rev/180aae8f8d2d
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.