Patch: Crash: blocking JS alert and deleting a window

David Faure david at mandrakesoft.com
Tue Nov 5 21:08:20 GMT 2002


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tuesday 05 November 2002 21:25, Koos Vriezen wrote:
> On Tue, 29 Oct 2002, Koos Vriezen wrote:
> 
> > On Mon, 28 Oct 2002, David Faure wrote:
> >
> >
> > > > Btw. if this is the only solution we can think of, we are still not done.
> > > > What about scripts like: 'alert(foo);alert(bar)' or
> > > > 'eval("alert(foo)");alert(bar)'? KJS::Window should also be informed
> > > > not to spawn another message box.
> > >
> > > (saw your next msg). Hmm, strange indeed. Will check tomorrow (I'll also try
> > > to come up with a patch for my CloseEvent idea).
> >
> > If you can produce one, I think between closeChildDialogs() and clear() of
> > KHTMLView, there shouldn't be any child popups allowed. (already made a
> > patch for it, but then couldn't find a testcase for it, yes the otherway
> > around, mind crashing :-) )
> 
> Fortunately I didn't turn crazy, bug 50178. Breaking on
> QApplication::exit_loop and QApplication::enter_loop shows that a second
> messagebox is created after KHTMLView::closeChildDialog is called.
> Attached a patch for it.

Unfortunately necessary.
Nitpicking: I would call it dialogsAllowed(), not popupsAllowed().
Because popup sounds like window.open, and to be consistent with closeChildDialogs().
Other than that, looks good.

- -- 
David FAURE, david at mandrakesoft.com, faure at kde.org
http://people.mandrakesoft.com/~david/
Contributing to: http://www.konqueror.org/, http://www.koffice.org/
Get the latest KOffice - http://download.kde.org/stable/koffice-1.2/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE9yDNE72KcVAmwbhARAhW2AJ0a/yMaPG1pUJ2QO2q2qy0iTAUe8ACfZWc+
cHoiMlLKpSv5FQxbqMPjJpU=
=P7c9
-----END PGP SIGNATURE-----





More information about the kfm-devel mailing list