Patch: Crash: blocking JS alert and deleting a window

Koos Vriezen koos.vriezen at xs4all.nl
Fri Oct 18 16:24:17 BST 2002


On Fri, 18 Oct 2002, David Faure wrote:

> On Friday 18 October 2002 17:05, Koos Vriezen wrote:
> > Btw, I'm trying very hard finding cases where this would lead to crashes
> > too.
>
> I'm right now looking at #49068, which still crashes :(
>
> > Didn't succeed yet, even:
> >   <html><head><script>
> >     setTimeout('self.location.replace("http://slashdot.org")', 3000);
> >   </script></head>
> >   <body><INPUT TYPE=TEXT onFocus='alert(somevar);this.value="some text";'>
> >   </body></html>
> > this evil script doesn't cause a crash (click on the INPUT within three
> > seconds). However one may ask if the alert box shouldn't disappear after a
> > reload/replace. Shouldn't there be something similar in
> > KHTMLPart::closeURL() too?
>
> Hmm, maybe this would fix it?
>
> But globally, I'm very surprised that simply hiding modal dialogs is enough.
> Does that make their exec() call return?

qt-copy/src/dialogs/qdialog.cpp:704
void QDialog::hide()
...
    QWidget::hide();
    if ( in_loop ) {
        in_loop = FALSE;
        qApp->exit_loop();
    }

I thinks so.

Koos





More information about the kfm-devel mailing list