Closed Bug 400786 Opened 18 years ago Closed 6 years ago

Proto bindings hold (unjustified) weak refs to other proto bindings

Categories

(Core :: XBL, defect, P3)

x86
Linux
defect

Tracking

()

RESOLVED WONTFIX

People

(Reporter: bzbarsky, Assigned: sicking)

Details

nsXBLPrototypeBinding::mBaseBinding is a weak ref. But this can be to a binding owned by some totally different document info, so there's nothing guaranteeing it will stay alive. We probably need to make this a strong ref and cycle-collect accordingly.
Flags: blocking1.9?
Do you know off hand what needs to be added to the cycle collector?
Assignee: nobody → jonas
Flags: blocking1.9? → blocking1.9+
That's a really good question. One issue here is that nsXBLPrototypeBinding itself is not refcounted and not cycle collected. I guess traversing an nsXBLDocumentInfo would need to walk its proto binding hashtable, and for each one traverse to the nsXBLDocumentInfo of the mBaseBinding. That would reflect how things are owned, I think. Not sure what the safest way to Unlink would be.
Flags: wanted1.9.0.x+
Flags: tracking1.9+
Flags: blocking1.9-
Priority: P2 → --
Flags: wanted1.9.0.x-
Flags: wanted1.9.0.x+
Flags: wanted-next+
Priority: -- → P3

XBL is now disabled in Firefox (Bug 1583314) and is in the process of being removed from Gecko (Bug 1566221), so closing bugs requesting changes to its implementation as wontfix.

Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.