Closed Bug 6665 Opened 26 years ago Closed 26 years ago

Sorting causes my message resources to be deleted

Categories

(Core Graveyard :: RDF, defect, P3)

x86
Windows NT
defect

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: scottputterman, Assigned: waterson)

Details

(Whiteboard: fix ready to go.)

I'm not sure if this is a bug, but I don't think this should be happening. RDF has the only reference to my message resources. When a sort occurs, they are all getting released and therefore deleted. This causes other problems for me (it's my fault these problems occur, not yours, but if they weren't getting deleted, you'd fix my problems :) ). Anyway, they are getting deleted in: RDFElementImpl::SetDocument(RDFElementImpl * const 0x0446da50, nsIDocument * 0x00000000, int 1) line 1365 RDFElementImpl::RemoveChildAt(RDFElementImpl * const 0x0443bfb0, int 13, int 0) line 1631 XULSortServiceImpl::RemoveAllChildren(nsIContent * 0x0443bfb0) line 644 XULSortServiceImpl::SortTreeChildren(nsIContent * 0x0443bfb0, int 0, _sortStruct * 0x0012e4a4, int 0) line 1037 XULSortServiceImpl::DoSort(XULSortServiceImpl * const 0x03f5a480, nsIDOMNode * 0x03fa2dd0, const nsString & {"http://home.netscape.com/NC-rdf#Subject"}, const nsString & {"ascending"}) line 1361 + 27 bytes nsRDFCore::DoSort(nsRDFCore * const 0x045491e0, nsIDOMNode * 0x03fa2dd0, const nsString & {"http://home.netscape.com/NC-rdf#Subject"}, const nsString & {"ascending"}) line 159 when nsCOMPtr<nsIRDFResource> resource; GetResource(getter_AddRefs(resource)); goes out of scope.
Assignee: rjc → waterson
Status: NEW → ASSIGNED
Target Milestone: M7
So we can fix this by forcing the sort code to take ownership of each _resource_ (as well as each node) before removing the node from the content model to sort. This is probably a decent optimization to make, as I believe that it'll happen with other resources as well. Heck, I'll even take the bug.
Whiteboard: fix ready to go.
Status: ASSIGNED → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
Pile on! Fix checked in.
Chris. Thanks for checking this in. I'll try it out with tomorrow's builds.
scott, does this work for you yet?
Status: RESOLVED → VERIFIED
It looks like this is working. Marking verified.
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.