Patch for 68523

Germain Garand germain at ebooksfrance.org
Fri Oct 1 10:06:59 BST 2004


Le Jeudi 30 Septembre 2004 13:13, Allan Sandfeld Jensen a écrit :
> Based on your information I've writen a new patch which solves all the
> crashes mentioned as duplicates under 68523.
>
> Basically I've moved the call of setParsing(true) to the constructor of
> HTMLParser.
>

Sorry for the late answer, I'm a bit struggled by time ;(
From what I can see in #89040, the general problem is with cross-frame scripts 
that document.write() to others, while the corresponding part is already 
completed.
So the parsing() state is not the only problem.

Setting the parsing flag systematically looks like a good idea, but not doing 
that from the parser itself as it will live longer than the parsing, and it's 
not generic. I'd say DocumentImpl::write is good because it's the only entry 
point.

Also, we need to honour close() requests on the document in this case,
or the tokenizer will never know when it's done (see attached testcase)... but 
then we have again the problem of the part itself executing the close from a 
script generated externally, so it seems your isExecutingScript flag would be 
perfect for that use.

So attached patch elaborates on the idea. Not really pretty, but I'm lacking 
time to refine much further... ideally, the part should handle resetting the 
document...

What do you think?

Greetings,
Germain
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20041001/84ff3f15/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: text/x-diff
Size: 5278 bytes
Desc: not available
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20041001/84ff3f15/attachment.diff>


More information about the kfm-devel mailing list