Open Bug 570614 Opened 14 years ago Updated 2 years ago

imgRequestProxy should not hold on to its listener - let imgRequestStatusTracker do it instead

Categories

(Core :: Graphics: ImageLib, defect)

x86
macOS
defect

Tracking

()

People

(Reporter: joe, Unassigned)

References

Details

Attachments

(1 file)

Right now we have no required users of imgRequestProxy::GetDecoderObserver - that is, the only user doesn't actually need it. We should put all the observer wrangling into imgRequestStatusTracker, and remove observers from imgRequestProxy altogether. Unfortunately, we do need some way of associating listener with proxy - when the listener cancels the proxy, we'll need to remove the listener from the imgRequestStatusTracker. One option would be to unregister the listener explicitly - request->UnregisterListener(this) - before Cancel, but unfortunately we need to cancel asynchronously.
Whiteboard: [sg:nse]
So what's the new ownership model for imgRequestProxies and their observers?
I believe the goal would be for the StatusTracker to hold a weak reference to the observer. The user of the imgRequestProxy would need to unregister the observer before deleting the imgRequestProxy.
OK, so pretty much what we have now, sounds like...
Group: core-security
Depends on: 572520
No longer depends on: 553565
Whiteboard: [sg:nse]
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: