Created attachment 451693 [details] [diff] [review] Patch (v1) The code responsible for creating BR nodes in the editor uses nsCOMPtr*'s, which makes my eyes bleed when reading the code. Also, the code forces the callers to receive the created BR node, which is unnecessary for many callers, resulting in needless refcount manipulations.
So, it turns out that this patch is not useful at all. The semantics of using getter_AddRefs and passing an nsCOMPtr* are not the same, because getter_AddRefs releases its pointer before the call happens, and using nsCOMPtr* only releases that pointer if the callee has actually assigned to it. This patch causes numerous crashes everywhere, and I think that the time I need to spend to track them down is not worth the benefit right now.