Fix for crash when assigning document.body
Maciej Stachowiak
mjs at apple.com
Fri Oct 3 15:23:34 CEST 2003
On Oct 3, 2003, at 2:19 PM, David Faure wrote:
> 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.
OK, nevermind my last message. Your patch looks great and I'm applying
it to the WebCore tree.
- Maciej
More information about the Khtml-devel
mailing list