Closed
Bug 1275229
Opened 7 years ago
Closed 7 years ago
Stop using do_CreateInstance("@mozilla.org/image/loader;1") to create gecko internal imgLoader instances
Categories
(Core :: Graphics: ImageLib, defect)
Core
Graphics: ImageLib
Tracking
()
RESOLVED
FIXED
mozilla49
Tracking | Status | |
---|---|---|
firefox49 | --- | fixed |
People
(Reporter: jwatt, Assigned: jwatt)
Details
Attachments
(1 file)
7.65 KB,
patch
|
tnikkel
:
review+
|
Details | Diff | Splinter Review |
imgLoader currently uses do_CreateInstance("@mozilla.org/image/loader;1") to create imgLoader instances because it needs its XPCOM module to be initialized before imgLoader instances are created or used, and do_CreateInstance takes care of that. That's silly though. We can just initialize the module ourselves which is more efficient, less confusing, and clears the way to getting rid of "@mozilla.org/image/loader;1" and "@mozilla.org/image/cache;1".
![]() |
Assignee | |
Comment 1•7 years ago
|
||
Attachment #8755799 -
Flags: review?(tnikkel)
![]() |
Assignee | |
Comment 2•7 years ago
|
||
FWIW I built without the module initialization to see what breaks. The first thing to break is the sMemReporter->AddRef() call in the imgLoader constructor, since sMemReporter is created during the module initialization step. That was tricky to figure out though because the errors on Try were really opaque (hence why I think this is worth a comment for anyone doing bug archeology in the future). https://treeherder.mozilla.org/#/jobs?repo=try&revision=c3686b389285&selectedJob=21300550
Updated•7 years ago
|
Attachment #8755799 -
Flags: review?(tnikkel) → review+
Comment 4•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/a03bd5fc36c0
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox49:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla49
You need to log in
before you can comment on or make changes to this bug.
Description
•