Clean up the code for BR insertion in the editor

RESOLVED WONTFIX

Status

()

Core
Editor
RESOLVED WONTFIX
8 years ago
8 years ago

People

(Reporter: Away for a while, Assigned: Away for a while)

Tracking

Trunk
x86
Mac OS X
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 obsolete attachment)

(Assignee)

Description

8 years ago
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.
Attachment #451693 - Flags: review?(roc)
Flags: wanted-fennec1.0?
(Assignee)

Updated

8 years ago
Flags: wanted-fennec1.0?
(Assignee)

Comment 1

8 years ago
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
Last Resolved: 8 years ago
Resolution: --- → WONTFIX
(Assignee)

Updated

8 years ago
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.