Closed Bug 658143 Opened 10 years ago Closed 10 years ago

Stop creating nsFrameSelection with CreateInstance

Categories

(Core :: Layout, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla6

People

(Reporter: craig.topper, Assigned: craig.topper)

References

Details

Attachments

(3 files, 2 obsolete files)

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.
Attachment #533515 - Attachment is obsolete: true
Attachment #533517 - Flags: review?(roc)
Attachment #533537 - Flags: review?(roc)
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+
Attachment #533539 - Attachment is obsolete: true
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+
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
Closed: 10 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla6
I love it. Does nsFrameSelection still need to inherit from nsISupports?
(In reply to comment #11)
> I love it. Does nsFrameSelection still need to inherit from nsISupports?

I don't think so.
I'll look into that and de-virtualizing its methods. Also going to remove the IID define I forgot to remove.
I think the cycle collecting stuff requires the nsISupports inheritance. :(
nevermind clearly i don't really understand cycle collecting.
Blocks: 658750
You need to log in before you can comment on or make changes to this bug.