Closed Bug 310107 Opened 19 years ago Closed 17 years ago

Binding prototype is not unhooked at document teardown

Categories

(Core :: XBL, defect)

defect
Not set
trivial

Tracking

()

RESOLVED FIXED

People

(Reporter: bryner, Unassigned)

References

Details

Attachments

(2 files)

Spun off from bug 293386 comment 15 : There's a fairly old regression where binding prototypes are not unhooked at document teardown as they were intended to be. See attachment 197215 [details] for a testcase.
So.. I can easily fix the prototype unhooking in all cases _except_ that of bfcache. How do you suggest we deal with bfcache here?
Since this all requires a script global to work, it seems like maybe we should listen for pagehide and detach the prototype there, then reattach it at pageshow if necessary.
Hmm... Or maybe something is even more screwed up than I thought. When I change the check for the implementation to actually work, we end up creating a brand new wrapper for the node in this code! How did our old wrapper go away given that someone's holding a ref to it? Or why are we failing to find it, at least?
For what it's worth, for 1.9 I think we should move towards documents always having a script global, no matter what. That is, make the inner window have the same exact lifetime as the document (possibly share a refcount?).
Flags: blocking1.9a1+
Depends on: 321299
Flags: blocking1.9-
Depends on: 398135
Once bug 398135 is checked in, this test can go in too.
Should be fixed by bug 398135. Test checked in.
Status: NEW → RESOLVED
Closed: 17 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: