Closed Bug 2189 Opened 26 years ago Closed 25 years ago

nsImageManager uses static constructors

Categories

(Core Graveyard :: GFX, defect, P2)

x86
Other
defect

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: akkzilla, Assigned: neeti)

Details

nsImageManager uses static constructors to initialize gImageManager. Static constructors are banned by the portability standards (see http://www.mozilla.org/docs/tplist/catBuild/portable-cpp.html#dont_use_static_constructors) because they make it very difficult to port the code to other platforms (many platforms don't call static constructors on loading shared libraries). On a lot of platforms, the viewer crashes at startup because gImageManager is 0.
kipp, is this still an issue given your latest changes?
Setting all current Open/Normal to M4.
QA Contact: 4110
per leger, assigning QA contacts to all open bugs without QA contacts according to list at http://bugzilla.mozilla.org/describecomponents.cgi?product=Browser
Assignee: michaelp → pnunn
Target Milestone: M4 → M5
the image manager should become a service and this problem will go away.
QA Contact: 4110 → 1698
Status: NEW → ASSIGNED
Target Milestone: M5 → M6
Target Milestone: M6 → M9
Target Milestone: M9 → M10
Wellll, it looks like the gfx Image Mananger isn't going away anytime soon. -pn
Target Milestone: M10 → M11
Target Milestone: M11 → M15
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
ImageManager has been made a service. see bug #15820
Akkana, Would you like to confirm that this is addressed to your satisfaction, and mark it as Verified/Fixed? (Otherwise, I'll just rubber-stamp it as Verified.) Thanks!
Status: RESOLVED → REOPENED
gImageManager is no longer statically initialized. However, it is now a pointer, and it isn't initialized to zero. Some platforms don't automatically initialize variables to zero, so this won't always work on all platforms. This really should be initialized to zero for portability.
Resolution: FIXED → ---
Clearing FIXED resolution due to reopen.
Assignee: pnunn → neeti
Status: REOPENED → NEW
Status: NEW → ASSIGNED
Status: ASSIGNED → RESOLVED
Closed: 25 years ago25 years ago
Resolution: --- → FIXED
Checked in a fix. Initialized gImageManager to zero.
Akkana, would you like to re-verify this? Otherwise, I can rubber-stamp it verified without inspection. Thanks!
Sorry, I thought I marked this verified a while ago. It looks fine now -- trying again. :-)
Status: RESOLVED → VERIFIED
Thanks, Akkana!
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.