Stop creating nsFrameSelection with CreateInstance

RESOLVED FIXED in mozilla6

Status

()

Core
Layout
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: Craig Topper, Assigned: Craig Topper)

Tracking

(Blocks: 1 bug)

Trunk
mozilla6
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(3 attachments, 2 obsolete attachments)

(Assignee)

Description

6 years ago
nsFrameSelection is created in two places with createInstance. Both places are inside the layout module and can just create nsFrameSelection directly.

This removes the need to be able to create nsFrameSelection with createInstance. Then nsFrameSelection no longer needs an IID since there are no other QIs.
(Assignee)

Comment 1

6 years ago
Created attachment 533515 [details] [diff] [review]
Part 1: Changes nsCOMPtr<nsFrameSelection> to nsRefPtr.
(Assignee)

Comment 2

6 years ago
Created attachment 533517 [details] [diff] [review]
Part 1: Changes nsCOMPtr<nsFrameSelection> to nsRefPtr.
(Assignee)

Updated

6 years ago
Attachment #533515 - Attachment is obsolete: true
(Assignee)

Comment 3

6 years ago
Created attachment 533537 [details] [diff] [review]
Part 2: Don't use createInstance for nsFrameSelection.
(Assignee)

Comment 4

6 years ago
Created attachment 533539 [details] [diff] [review]
Part 3: Remove nsFrameSelection QI and createInstance support.
(Assignee)

Updated

6 years ago
Attachment #533517 - Flags: review?(roc)
(Assignee)

Updated

6 years ago
Attachment #533537 - Flags: review?(roc)
(Assignee)

Updated

6 years ago
Attachment #533539 - Flags: review?(roc)
Comment on attachment 533517 [details] [diff] [review]
Part 1: Changes nsCOMPtr<nsFrameSelection> to nsRefPtr.

Review of attachment 533517 [details] [diff] [review]:
-----------------------------------------------------------------
Attachment #533517 - Flags: review?(roc) → review+
Comment on attachment 533537 [details] [diff] [review]
Part 2: Don't use createInstance for nsFrameSelection.

Review of attachment 533537 [details] [diff] [review]:
-----------------------------------------------------------------
Attachment #533537 - Flags: review?(roc) → review+
Comment on attachment 533539 [details] [diff] [review]
Part 3: Remove nsFrameSelection QI and createInstance support.

Review of attachment 533539 [details] [diff] [review]:
-----------------------------------------------------------------
Attachment #533539 - Flags: review?(roc) → review+
(Assignee)

Comment 8

6 years ago
Created attachment 533891 [details] [diff] [review]
Part 3: Remove nsFrameSelection QI and createInstance support.
(Assignee)

Updated

6 years ago
Attachment #533539 - Attachment is obsolete: true
(Assignee)

Comment 9

6 years ago
Comment on attachment 533891 [details] [diff] [review]
Part 3: Remove nsFrameSelection QI and createInstance support.

Somehow the nsLayoutCID.h change was applied against another patch in my tree. This version fixes that. Carrying forward r+
Attachment #533891 - Flags: review+
(Assignee)

Updated

6 years ago
Keywords: checkin-needed
http://hg.mozilla.org/mozilla-central/rev/af460fe4ec78
http://hg.mozilla.org/mozilla-central/rev/d4dc048d429f
http://hg.mozilla.org/mozilla-central/rev/0bbb1318a394
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla6
I love it. Does nsFrameSelection still need to inherit from nsISupports?

Comment 12

6 years ago
(In reply to comment #11)
> I love it. Does nsFrameSelection still need to inherit from nsISupports?

I don't think so.
(Assignee)

Comment 13

6 years ago
I'll look into that and de-virtualizing its methods. Also going to remove the IID define I forgot to remove.
(Assignee)

Comment 14

6 years ago
I think the cycle collecting stuff requires the nsISupports inheritance. :(
(Assignee)

Comment 15

6 years ago
nevermind clearly i don't really understand cycle collecting.
(Assignee)

Updated

6 years ago
Blocks: 658750
You need to log in before you can comment on or make changes to this bug.