Last Comment Bug 230086 - Destructor of XBL element isn't called when I remove this element from DOM
: Destructor of XBL element isn't called when I remove this element from DOM
Status: NEW
:
Product: Core
Classification: Components
Component: XBL (show other bugs)
: Trunk
: x86 Windows 2000
: -- normal with 2 votes (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
:
Mentors:
Depends on: 83635
Blocks: 229703 296474
  Show dependency treegraph
 
Reported: 2004-01-04 19:50 PST by alexander :surkov
Modified: 2011-10-28 11:07 PDT (History)
18 users (show)
jonas: blocking1.9-
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
This is test xbl (698 bytes, text/xml)
2004-01-04 20:14 PST, alexander :surkov
no flags Details
Run me (513 bytes, application/vnd.mozilla.xul+xml)
2004-01-04 20:14 PST, alexander :surkov
no flags Details

Description alexander :surkov 2004-01-04 19:50:02 PST
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5) Gecko/20031007
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5) Gecko/20031007

When I remove XBL element from DOM by removeChild() method than XBL destructor
isn't called. I think desctructor should be called.

Reproducible: Always

Steps to Reproduce:
Comment 1 Benjamin Smedberg [:bsmedberg] 2004-01-04 19:53:18 PST
testcase, please
Comment 2 alexander :surkov 2004-01-04 20:14:16 PST
Created attachment 138401 [details]
This is test xbl
Comment 3 alexander :surkov 2004-01-04 20:14:51 PST
Created attachment 138402 [details]
Run me
Comment 4 Gervase Markham [:gerv] 2005-09-27 02:07:27 PDT
This is an automated message, with ID "auto-resolve01".

This bug has had no comments for a long time. Statistically, we have found that
bug reports that have not been confirmed by a second user after three months are
highly unlikely to be the source of a fix to the code.

While your input is very important to us, our resources are limited and so we
are asking for your help in focussing our efforts. If you can still reproduce
this problem in the latest version of the product (see below for how to obtain a
copy) or, for feature requests, if it's not present in the latest version and
you still believe we should implement it, please visit the URL of this bug
(given at the top of this mail) and add a comment to that effect, giving more
reproduction information if you have it.

If it is not a problem any longer, you need take no action. If this bug is not
changed in any way in the next two weeks, it will be automatically resolved.
Thank you for your help in this matter.

The latest beta releases can be obtained from:
Firefox:     http://www.mozilla.org/projects/firefox/
Thunderbird: http://www.mozilla.org/products/thunderbird/releases/1.5beta1.html
Seamonkey:   http://www.mozilla.org/projects/seamonkey/
Comment 5 Boris Zbarsky [:bz] (TPAC) 2005-09-27 09:56:10 PDT
Unfortunately, detaching bindings when removing from a document would actually
break a good deal of our content.  We need to come up with a sane XBL attachment
story...
Comment 6 alexander :surkov 2005-09-27 20:49:34 PDT
Should be desctuctor called? Note a bug 265086.
Comment 7 Mike Schroepfer 2007-11-05 13:16:10 PST
Jonas is this something we want to get fixed?
Comment 8 Jonas Sicking (:sicking) No longer reading bugmail consistently 2007-11-05 14:13:58 PST
Not for firefox 3 unless this is holding back extension developers a lot?

The leak in bug 296474 should be fixable through other means.
Comment 9 Mike Schroepfer 2007-11-05 14:23:53 PST
(In reply to comment #8)
> Not for firefox 3 unless this is holding back extension developers a lot?
> 
> The leak in bug 296474 should be fixable through other means.
> 

Will the leak in 296474 show up for others - e.g. is this a place to fix the issue for everyone...
Comment 10 Jonas Sicking (:sicking) No longer reading bugmail consistently 2007-11-05 15:00:33 PST
Yeah, most likely.
Comment 11 Boris Zbarsky [:bz] (TPAC) 2007-11-05 15:06:08 PST
Note that we could just have a pending destructor queue (like pending ctors), add bindings to it where we currently tear down the binding implementation, and do all that, plus firing destructor, in either EndUpdate or off an event (like we do constructors).

It's a scary change, though.  Really scary.  Likely to break some chrome, I bet (due to chrome working around this bug, at least in part).
Comment 12 Jonas Sicking (:sicking) No longer reading bugmail consistently 2007-11-05 18:21:47 PST
Yeah, i'm more worried about chrome depending on things working as they currently are, than not being able to implement this "safely".
Comment 13 Dão Gottwald [:dao] 2010-03-09 03:39:22 PST
Are there some concrete examples for how a chrome dependency on this might look like? I'm not sure the dependency actually exists. But if it does, I guess it would be trivial to fix.

Note You need to log in before you can comment on or make changes to this bug.