Bug 1654452 Comment 3 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

Incidentally, this is the last "trivially upgradeable-to-UniquePtr" instance of `delete mFoo` (for some member variable with an "m" prefix) in the `layout/generic` directory -- here are the other cases that still remain in that directory:

(1) nsIFrame.cpp has some "delete mFoo" invocations that are part of `DR_FrameTypeInfo` and friends (which are used for debugging/logging & which would require some special configuration when testing changes, to be sure that code is getting exercised; aside from this configuration, these ones are probably easy to clean up if someone wants to do so).

(2) nsLineBox.h and .cpp have some "delete mFoo" instances for pointers that are stored in `union { ... }` structures (which can't directly be replaced with UniquePtr, because unions don't invoke destructors for their "members".)

(3) nsTextRunTransformations.h has a pointer to a shared object that one object strongly owns, with the ownership only by a bool (set to true on the owner struct).  This is also non-trivial to replace with UniquePtr.
Incidentally, this is the last "trivially upgradeable-to-UniquePtr" instance of `delete mFoo` (for some member variable with an "m" prefix) in the `layout/generic` directory -- here are the other cases that still remain in that directory:

(1) nsIFrame.cpp has some "delete mFoo" invocations that are part of `DR_FrameTypeInfo` and friends (which are used for debugging/logging & which would require some special configuration when testing changes, to be sure that code is getting exercised; aside from this configuration, these ones are probably easy to clean up if someone wants to do so).

(2) nsLineBox.h and .cpp have some "delete mFoo" instances for pointers that are stored in `union { ... }` structures (which can't directly be replaced with UniquePtr, because unions don't invoke destructors for their "members".)

(3) nsTextRunTransformations.h has a pointer to a shared `mFactory` object that one instance strongly owns, with the ownership tracked only by a bool (set to true on the owner instance, and false on all other instances that share it).  This is also non-trivial to replace with UniquePtr.

Back to Bug 1654452 Comment 3