gfxPlatform::Init needs to crash rather than returning an error if it fails

RESOLVED FIXED

Status

()

Core
Graphics
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: zwol, Assigned: zwol)

Tracking

({regression})

Trunk
regression
Points:
---

Firefox Tracking Flags

(firefox6+ fixed)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

6 years ago
+++ This bug was initially created as a clone of Bug #651498 +++
> As a side note, gfxPlatform::Init ought to crash rather than returning an error
> code -- even in production builds -- if anything fails to start up, because
> nothing checks for a null pointer return from gfxPlatform::GetPlatform, so
> we're going to crash anyway.  But this was already broken, so I think it should
> get its own bug.
(Assignee)

Comment 1

6 years ago
Created attachment 527595 [details] [diff] [review]
patch

Thus.

Some of these may already be covered by infallible malloc but I don't feel like auditing them just now.
Attachment #527595 - Flags: review?(joe)
Comment on attachment 527595 [details] [diff] [review]
patch

Yes please.
Attachment #527595 - Flags: review?(joe) → review+
(Assignee)

Comment 3

6 years ago
This is done and bug 651498 isn't, so I'm switching the dependency around so this can land (it's only a textual dependency).
Blocks: 651498
No longer depends on: 651498
(Assignee)

Comment 4

6 years ago
Created attachment 528043 [details] [diff] [review]
as will be checked in

only change is to remove said textual dependency.
Attachment #527595 - Attachment is obsolete: true
Attachment #528043 - Flags: review+
(Assignee)

Comment 5

6 years ago
http://hg.mozilla.org/mozilla-central/rev/2250bc3d0532
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED

Updated

6 years ago
status-firefox6: --- → fixed
Mozilla/5.0 (X11; Linux x86_64; rv:6.0) Gecko/20100101 Firefox/6.0

Could you please provide a test case for this issue in order for it to be set to verified Fixed?
(Assignee)

Comment 7

6 years ago
This changed how promptly we crash under conditions that should never actually occur.  I do not believe a test case is feasible.
You need to log in before you can comment on or make changes to this bug.