KIO question - synchronous IO?

Maciej Stachowiak mjs at apple.com
Wed Nov 19 09:15:07 CET 2003


On Nov 18, 2003, at 11:54 PM, David Faure wrote:

> On Wednesday 19 November 2003 07:48, Maciej Stachowiak wrote:
>> I think this would be a great long-term solution. But I don't think it
>> is currently possible to pause kjs execution at an arbitrary point in
>> the JavaScript code and then resume later. Much of the current
>> execution state is represented by the C/C++ call stack.
>
> Hmm, indeed. I hadn't really thought this through it seems.
> Then you need a local event loop indeed (like in 
> kdelibs/kio/kio/netaccess.cpp)

I'll try to use the netaccess API, and for WebCore I will probably do 
an implementation that uses system sync networking APIs instead of the 
local event loop, since we have made no effort to be safe against event 
loop re-entrancy for Safari.

Regards,
Maciej

P.S. I want to eventually redo KJS to support continuations, I think 
this would be useful for not only XMLHttpRequest but also for pausing 
the interpreter when JS wants a layout property and style sheets aren't 
in yet; showModalDialog if we ever implement it; alert() and prompt() 
and the like if implemented as a window-modal dialog or sheet, as we'd 
like to do for Safari; and probably other stuff I am not thinking of at 
the moment. It could also make it easier to avoid long JS execution 
blocking the UI, by dropping back to the event loop every once in a 
while during execution. But this will probably be a major change to the 
internals.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2355 bytes
Desc: not available
Url : https://mail.kde.org/mailman/private/khtml-devel/attachments/20031119/e6d6e7ab/smime.bin


More information about the Khtml-devel mailing list