null checking of NS_NewStyleContext is unnecessary

RESOLVED FIXED in mozilla25

Status

()

RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: heycam, Assigned: heycam)

Tracking

unspecified
mozilla25
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

Since nsPresArena allocations are infallible, we can avoid null checking the result of NS_NewStyleContext.
Created attachment 782880 [details] [diff] [review]
patch
Assignee: nobody → cam
Status: NEW → ASSIGNED
Attachment #782880 - Flags: review?(dbaron)
Comment on attachment 782880 [details] [diff] [review]
patch

r=dbaron.

It would be great to fix some of the other places that null check frame style contexts too (especially things that are documentation-like, such as nsIFrame::SetStyleContext[WithoutNotification] and nsFrame:~nsFrame).
Attachment #782880 - Flags: review?(dbaron) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/0261e8137818

Yeah I'll look into more null checks that can be removed.

Comment 4

5 years ago
https://hg.mozilla.org/mozilla-central/rev/0261e8137818
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla25
You need to log in before you can comment on or make changes to this bug.