Fix for crash when assigning document.body
David Faure
faure at kde.org
Sat Oct 4 00:19:08 CEST 2003
On Friday 03 October 2003 23:05, David Faure wrote:
> On Friday 03 October 2003 22:37, Maciej Stachowiak wrote:
> >
> > This patch fixes two problems that led to a crash on this HTML:
> >
> > <html>
> > <body>
> > <script>document.body = new Object</script>
> > </body>
> > </html>
> >
> > First of all, setting a document body to null at the C++ level should
> > be ignored, instead of removing the body, because that's what happens
> > when the JavaScript bindings can't convert the argument to a node.
>
> Mozilla handles this a little bit better though, it throws out an exception
> (HIERARCHY_REQUEST_ERR).
Patch attached.
--
David FAURE, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: document_body_exception.diff
Type: text/x-diff
Size: 3597 bytes
Desc: not available
Url : http://mail.kde.org/mailman/private/khtml-devel/attachments/20031003/522e218f/document_body_exception.bin
More information about the Khtml-devel
mailing list