KJS crash: var v=[]; v[0]=v; var w=""+v;

Harri Porten porten at trolltech.com
Mon Jul 8 14:00:30 BST 2002


On Sat, 6 Jul 2002, Koos Vriezen wrote:

> Interesting, never used the try/catch in JS. Hmm, this object being
> thrown, doesn't seem to show useful error information:

> shows an alert box with:
>   TypeError: No default value
>   name=TypeError
>   message=No default value
>   message=No default value

Hmmm. With the other kind of recursion (khtmltests/js/crash-2.js) I get
the expected name (RangeError) and message (Maximum call stack size
exceeded). Looks like the "No default value" is overwriting the other one.
Is this a problem ? It's an exception after all. Just coming from a higher
level.

> > P.S. NS 4.7 segfaulted on this one, too. Didn't try any other browser.
> 
> Mozilla makes an empty string of w.

Hmmm. Would require more work. Tell me if you ever have a problem with
this difference in a real world script.

Harri.





More information about the kfm-devel mailing list