little leaks & crashes, e4x, input radio

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

little leaks & crashes, e4x, input radio

Marco Mariani
Dear engine engineers,

  I'm currently working on an ajax framework (forms, and so on) and I'm
targetting firefox 1.5 _only_.

I'm quite cautious with how I handle objects: nice encapsulation (either
with prototypes or with functions a la GTK+), as few closures as
possible, some expandos to attach field definitions to input elements,
very few global vars. And event bubbling to attach as few events as
possible to forms and tables.

I'm using E4X with 1.5beta2, and I find it less likely to crash than
beta1, where I was experiencing daily crashes in complex queries.

Now with my doubts.

1) I'd like to know if, at the moment, E4X is considered stable enough
for production use. My customers will use this program for many hours a
day, and all xmlhttp responses are converted to xml literals. I'd rather
not revert to xpath.

2) Is the "Fixing JavaScript memory leaks for good"
(http://talideon.com/weblog/2005/03/js-memory-leaks.cfm) Event Manager
of any use? We're not supporting other browsers until we take a very
deep breath, count to 1000 and decide to do so...

3) I have an issue with populating radio boxes. My form contains a
<fieldset name="foo"> element that is populated client-side with <input
type="radio" name="foo"> elements. Everything works perfectly if I give
a name="bar" to the input elements. Whenever I give name="foo" to input
elements, firefox loops forever.
Is this something I should report to bugzilla, or is there an inherent
problem with having other elements named the same as radio buttons?
I've tried calling removeAttribute('name') to the fieldset element,
after reading it, but the loop remains.

4) I'm happily attaching javascript objects of any kind, as properties
to many of my document elements. I had an epiphany when it became clear
that I could do that, and keep the code much simpler. Having relatively
little experience with javascript, are there possible leaks or issues I
should know of?


By the way, I'm serving pages with XHTML 1.1 DTD, but content-type as
text/html (yes, I shouldn't, but I have to).


I'd also like to kudo you all for the job you've done. Javascript is
really more than meets the eye.. but you already know that.




_______________________________________________
mozilla-jseng mailing list
[hidden email]
http://mail.mozilla.org/listinfo/mozilla-jseng
Reply | Threaded
Open this post in threaded view
|

Re: little leaks & crashes, e4x, input radio

Martin Honnen-3
Cross post and followup-to to netscape.public.mozilla.dom

Marco Mariani wrote:

> 3) I have an issue with populating radio boxes. My form contains a
> <fieldset name="foo"> element that is populated client-side with <input
> type="radio" name="foo"> elements. Everything works perfectly if I give
> a name="bar" to the input elements. Whenever I give name="foo" to input
> elements, firefox loops forever.

Let's take that to the proper group, the DOM group.
Can you post a URL to a minimal test case showing the problem?
Have you tried your code with other browsers, do they loop too?

And why do you need and use a name attribute on <fieldset> elements?
There is no name attribute defined for that, see
   <http://www.w3.org/TR/html4/interact/forms.html#h-17.10>
Not that it should cause problems if you use one but perhaps your
problem goes away if you use proper markup.


--

        Martin Honnen
        http://JavaScript.FAQTs.com/
_______________________________________________
mozilla-jseng mailing list
[hidden email]
http://mail.mozilla.org/listinfo/mozilla-jseng
Reply | Threaded
Open this post in threaded view
|

Re: little leaks & crashes, e4x, input radio

Christian Biesinger
In reply to this post by Marco Mariani
[followup-to .dom, which is a bit better for what I'm responding to...]

Marco Mariani wrote:
> By the way, I'm serving pages with XHTML 1.1 DTD, but content-type as
> text/html (yes, I shouldn't, but I have to).

Why do you have to serve them with the XHTML DTD?
_______________________________________________
mozilla-jseng mailing list
[hidden email]
http://mail.mozilla.org/listinfo/mozilla-jseng
Reply | Threaded
Open this post in threaded view
|

Re: little leaks & crashes, e4x, input radio

Brendan Eich
In reply to this post by Marco Mariani
Marco Mariani wrote:

> I'm using E4X with 1.5beta2, and I find it less likely to crash than
> beta1, where I was experiencing daily crashes in complex queries.


If you want to help here, you'll have to post testcases, or at least
talkback identifiers, so we can try to diagnose the crashes by their
stack backtraces.  Was talkback sent?

_______________________________________________
mozilla-jseng mailing list
[hidden email]
http://mail.mozilla.org/listinfo/mozilla-jseng
Reply | Threaded
Open this post in threaded view
|

Re: little leaks & crashes, e4x, input radio

Marco Mariani
Brendan Eich wrote:

>> I'm using E4X with 1.5beta2, and I find it less likely to crash than
>> beta1, where I was experiencing daily crashes in complex queries.
>
> If you want to help here, you'll have to post testcases, or at least
> talkback identifiers, so we can try to diagnose the crashes by their
> stack backtraces.  Was talkback sent?

Sorry, I did't think of tallkback because I usually compile firefox
myself (linux/amd64)

I've just sent a report of a repeatable crash I have with 1.5b2/win.

tnx
_______________________________________________
mozilla-jseng mailing list
[hidden email]
http://mail.mozilla.org/listinfo/mozilla-jseng