Closed Bug 732319 Opened 12 years ago Closed 12 years ago

Leak when an image needs CORS and the nsCORSListenerProxy constructor fails

Categories

(Core :: Graphics: ImageLib, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla13

People

(Reporter: bzbarsky, Assigned: bzbarsky)

Details

Attachments

(1 file)

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.
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
https://hg.mozilla.org/mozilla-central/rev/180aae8f8d2d
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: