Closed
Bug 1171282
Opened 10 years ago
Closed 10 years ago
Avoid some unnecessary |operator new| null-checks in layout/
Categories
(Core :: Layout, defect)
Core
Layout
Tracking
()
RESOLVED
FIXED
mozilla41
Tracking | Status | |
---|---|---|
firefox41 | --- | fixed |
People
(Reporter: n.nethercote, Assigned: n.nethercote)
References
Details
Attachments
(1 file)
7.06 KB,
patch
|
dholbert
:
review+
|
Details | Diff | Splinter Review |
AllocateByObjectID() is infallible. Therefore the |operator new| of nsFrameList,
nsLineBox and nsRuleNode are too, as is nsRuleNode::CreateRootNode().
The patch also removes a couple of comments duplicated in both .h and .cpp
files.
![]() |
Assignee | |
Comment 1•10 years ago
|
||
Attachment #8614998 -
Flags: review?(dholbert)
Comment 2•10 years ago
|
||
Did some brief hg archeology to be sure this stuff is really supposed to be infallible. Looks like it is, which is good. In particular:
(1) bug 809533 made nsPresArena allocation infallible. (and nsIPresShell::AllocateByObjectID uses nsPresArena for allocation)
(2) bug 899385 documented the fact that AllocateByObjectID is infallible (in mozilla-central changeset 627c3d68be29)
Setting dependency on those bugs.
Comment 3•10 years ago
|
||
Comment on attachment 8614998 [details] [diff] [review]
Avoid some unnecessary |operator new| null-checks in layout/
Looks good. r=me
Attachment #8614998 -
Flags: review?(dholbert) → review+
![]() |
Assignee | |
Comment 5•10 years ago
|
||
Thank you for the fast and careful review.
Comment 6•10 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
status-firefox41:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla41
You need to log in
before you can comment on or make changes to this bug.
Description
•