Closed Bug 8479 Opened 26 years ago Closed

alter RDF observer ownership to allow JS implementation

Categories

(Core Graveyard :: RDF, defect, P3)

defect

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: waterson, Assigned: waterson)

Details

The "composite datasource" composes together (and owns) indivdual datasources. It "spies" on those datasources by registering itself as an "observer" with each datasource. In order to avoid a leak in this case, I set up the ownership model s.t. a datasource holds a "weak" (not addref-ed) reference on an observer. XPConnect is not set up to handle this. Nor can it be, if it is to remain safe from dangling pointers. Brendan reminded me that I could in fact allow an observer to refcount its observee, and can break the circularity in "composite datasource" by special-casing its Release() method. Specifically, Release() will detect refcount == num-datasources, and know that these remaining references are the circular "back links" from the datasource observers.
Status: NEW → ASSIGNED
Target Milestone: M8
Fixed. Landed RDF_19990617_BRANCH.
Status: RESOLVED → VERIFIED
code level fix, marking verified. reopen if i'm wrong here...
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.