Crash: blocking JS and deleting a window

Koos Vriezen koos.vriezen at xs4all.nl
Sat Oct 5 12:37:43 BST 2002


On Sat, 5 Oct 2002, Simon Hausmann wrote:

> On Wed, Oct 02, 2002 at 08:44:16PM +0200, Koos Vriezen wrote:
> > Hi,
> >
> > Testcase:
> >
> > <html><head><script>
> >   var win=open("", "xxx");
> >   var doc=win.document;
> >   doc.open();
> >   doc.write("<html><body onLoad=\"alert(somevar)\">");
> >   doc.write("</body></html>");
> >   doc.close();
> > </script></head>
> > <body></body></html>
> >
> > After the second window is created, delete it by clicking the X button.
> > Even KCrash crashes on this one.
> > The problem is blocking JS (here the alert box, might as well be a
> > LiveConnect call). Currently I see these options:
>
> On a second though I don't understand how this can happen. The
> alert() triggers a messagebox with the window as parent, so it
> shouldn't be possible to close the window in the first place as the
> messagebox is modal. Any idea?

Same for 'Open Location' dialog. Bug in Qt?

There are other cases, eg calls to Java, that could block JS. Something
has to be done.
That khtml currently even self doesn't check if it can close the window
proves the next testcase

<html><head><script>
  var win=open("", "xxx");
  var doc=win.document;
  doc.open();

doc.write("<html><script>setTimeout('self.close()',1000);alert(somevar);<\/script><body>");
  doc.write("</body></html>");
  doc.close();
</script></head>
<body></body></html>

Crash with backtrace this time.

Koos





More information about the kfm-devel mailing list