Fix for crash when assigning document.body

Dirk Mueller mueller at kde.org
Sat Oct 4 01:19:18 CEST 2003


On Friday 03 October 2003 22:37, Maciej Stachowiak wrote:

> Second, the HTML parser needs to keep the "current" node ref'd, since
> script execution can remove arbitrary nodes from the document while
> parsing.

Yeah, aljazera.net, KDE bugreport 57020. I've implemented almost exactly your 
patch as well a few months ago (attached):

dirk at matrix:~/t> ls -l alja.html 
-rw-r--r--    1 dirk     users          98 2003-04-14 06:23 alja.html

and since then I have this patch applied to my tree. The reason I didn't 
commit yet is I still keep finding regressions due to the additional 
refcounting. 

One of the reasons is the memory leaking contextual fragment code that we 
merged from Safari tree. See attachment for a fix. To answer the FIXME 
comments in the code: yes, it does leak. 

BTW, any chance that we can peek into that Changelog your diff referenced?

-- 
> Looking for a KDE-related EMail-Alias ? Get one at kdemail.net for FREE! <
-------------- next part --------------
A non-text attachment was scrubbed...
Name: element.diff
Type: application/octet-stream
Size: 6003 bytes
Desc: not available
Url : http://mail.kde.org/mailman/private/khtml-devel/attachments/20031004/6a6a5031/element-0001.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: aljafix.diff
Type: application/octet-stream
Size: 5291 bytes
Desc: not available
Url : http://mail.kde.org/mailman/private/khtml-devel/attachments/20031004/6a6a5031/aljafix-0001.obj


More information about the Khtml-devel mailing list