Fix for crash when assigning document.body

Maciej Stachowiak mjs at apple.com
Fri Oct 3 15:21:32 CEST 2003


On Oct 3, 2003, at 2:05 PM, 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).

OK, I'll look into throwing an exception. I filed a bug to track this 
issue in case I don't get to it right away, but I hope to address it 
soon.

  - Maciej



More information about the Khtml-devel mailing list