Closed Bug 572513 Opened 15 years ago Closed 15 years ago

Clean up the code for BR insertion in the editor

Categories

(Core :: DOM: Editor, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: ehsan.akhgari, Assigned: ehsan.akhgari)

Details

Attachments

(1 obsolete file)

Attached patch Patch (v1) (obsolete) — Splinter Review
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.
Attachment #451693 - Flags: review?(roc)
Flags: wanted-fennec1.0?
Flags: wanted-fennec1.0?
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.
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → WONTFIX
Attachment #451693 - Attachment is obsolete: true
Attachment #451693 - Flags: review?(roc)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: