Closed Bug 360291 Opened 18 years ago Closed 18 years ago

Make nodes implement nsISupportsWeakReference

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: sicking, Assigned: sicking)

Details

Attachments

(1 file, 1 obsolete file)

Smaug needed this for a couple of his bugs, and I've needed this in the past too, so we should just do it. Is possible that we sometime in the future might fix these things with graydons cycle collector, but we can always revert at that point. I suspect that's quite a bit off though since a lot of code will have to be converted to it.

Anyhow, this makes all nodes implement nsISupportsWeakReference. Not sure if we technically need it on attribute nodes, but it may be nice to be able to rely on that anything implementing nsI(DOM)Node also implements nsISupportsWeakReference.
Attached patch Patch to fix (obsolete) — Splinter Review
This should do it. Documents already use nsSupportsWeakReference, and it may be a good idea to let them use that since they seem to be QIed to nsISupportsWeakReference often enough that it's nice to avoid creating the tearoff every time.
Attachment #245243 - Flags: superreview?(jst)
Attachment #245243 - Flags: review?(jst)
> but it may be nice to be able to rely on that anything implementing
> nsI(DOM)Node also implements nsISupportsWeakReference.

Can't rely on the nsIDOMNode part of that anyway -- any random JSObject will implement nsIDOMNode thanks to XPConnect.  The nsINode part might be nice, yes.
Comment on attachment 245243 [details] [diff] [review]
Patch to fix

r+sr=jst
Attachment #245243 - Flags: superreview?(jst)
Attachment #245243 - Flags: superreview+
Attachment #245243 - Flags: review?(jst)
Attachment #245243 - Flags: review+
Attached patch Update to tipSplinter Review
This is what I landed
Attachment #245243 - Attachment is obsolete: true
Checked in, thanks for the quick review.
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: