Open Bug 1317817 Opened 8 years ago Updated 11 months ago

nsContextMenu leaks BlobURLs for canvases opened in a new tab / window

Categories

(Firefox :: Menus, defect, P3)

defect

Tracking

()

People

(Reporter: mconley, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: [MemShrink:P2])

We use BlobURLs when the user right-clicks on a <canvas> and does things like viewing the canvas on its own, or saving it to disk.

The problem is that BlobURLs keep the resources around that they refer to because we can no longer GC things that _might_ still be referred to by URL.

This means that we'll leak the resources until we call URL.revokeObjectURL.
Whiteboard: [MemShrink]
Mike, is it possible to provide a sample web page to reproduce this? Also are you saying we leak the blobs completely, or just don't free them in a timely fashion?
Flags: needinfo?(mconley)
Sure, I think so.

1) Visit http://www.blobsallad.se/
2) Right click on the animated blob, and choose "View Image"

Notice that the Blob URL that is produced is blob:null/8e59ee06-23a9-3641-9e6e-520eb16ca72f. That "null" means that it's not bound to a particular origin, meaning (I believe) that it won't be cleared out when all documents at that origin are gone.

And I think that means that we're holding onto the resource indefinitely, since we never revoke the Blob URL.
Flags: needinfo?(mconley)
Blocks: 1319460
Whiteboard: [MemShrink] → [MemShrink:P2]
Summary: nsContextMenu is leaking BlobURLs for canvases → nsContextMenu leaks BlobURLs for canvases opened in a new tab / window
Severity: normal → N/A
Priority: -- → P3
Severity: N/A → S3
You need to log in before you can comment on or make changes to this bug.