Closed Bug 1275101 Opened 4 years ago Closed 4 years ago

Stop using XPCOM services to get the imgLoader in nsAlertsIconListener::StartRequest

Categories

(Toolkit :: General, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla49
Tracking Status
firefox49 --- fixed

People

(Reporter: jwatt, Assigned: jwatt)

Details

Attachments

(1 file, 1 obsolete file)

In nsAlertsIconListener::StartRequest we call:

  do_GetService("@mozilla.org/image/loader;1")

This means that this code uses a different imgLoader instance to the rest of the code that is linked into libxul. This code should be using imgLoader::Singleton().
Attached patch patch (obsolete) — Splinter Review
Attachment #8755582 - Flags: review?(tnikkel)
Attached patch patchSplinter Review
Attachment #8755582 - Attachment is obsolete: true
Attachment #8755582 - Flags: review?(tnikkel)
Attachment #8755585 - Flags: review?(tnikkel)
Attachment #8755585 - Flags: review?(tnikkel) → review+
(In reply to Jonathan Watt [:jwatt] from comment #0)
> In nsAlertsIconListener::StartRequest we call:
> 
>   do_GetService("@mozilla.org/image/loader;1")
> 
> This means that this code uses a different imgLoader instance to the rest of
> the code that is linked into libxul. This code should be using
> imgLoader::Singleton().

I don't know why those methods return different services, but the difference may have been due to this code being in a non-libxul component in the past.
I believe that was the case, so that would make sense.
https://hg.mozilla.org/mozilla-central/rev/303f10857c8e
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla49
You need to log in before you can comment on or make changes to this bug.