Closed Bug 1135181 Opened 10 years ago Closed 10 years ago

Make nsCSSRuleProcessor::Startup() infallible

Categories

(Core :: CSS Parsing and Computation, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla38
Tracking Status
firefox38 --- fixed

People

(Reporter: dholbert, Assigned: dholbert)

References

Details

Attachments

(1 file)

nsCSSRuleProcessor::Startup has a return-type of nsresult (and its caller, nsLayoutStatics::Initialize, has code to handle failure). But it always returns NS_OK. So it should just return void, and we should drop the failure-handling code.
Assignee: nobody → dholbert
Status: NEW → ASSIGNED
Flags: in-testsuite-
OS: Linux → All
Hardware: x86_64 → All
Historical notes: * It looks like this ::Startup method used to return void, but it was made fallible (w/ return type nsresult) here: http://hg.mozilla.org/mozilla-central/rev/d03d64716ccd#l2.106 to allow for the "NS_ENSURE_TRUE(gPrivateBrowsingObserver, NS_ERROR_OUT_OF_MEMORY);" line there. This NS_ENSURE_TRUE line and the nsresult return-type were briefly removed in http://hg.mozilla.org/mozilla-central/rev/9786ae3984b3#l2.105 , but that cset was backed out in http://hg.mozilla.org/mozilla-central/rev/81086dc562b0 . Later on, the NS_ENSURE_TRUE line was removed again, in http://hg.mozilla.org/mozilla-central/rev/cf941140cded#l1.98 , and that stuck -- but we didn't update the function-signature to make it return void this time.
Attached patch fix v1 (deleted) — Splinter Review
Attachment #8567247 - Flags: review?(cam)
Blocks: 1135200
Attachment #8567247 - Flags: review?(cam) → review+
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla38
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: