Closed Bug 1171282 Opened 5 years ago Closed 5 years ago
Avoid some unnecessary |operator new| null-checks in layout/
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.
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 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+
Thank you for the fast and careful review.
You need to log in before you can comment on or make changes to this bug.