[webkit-dev] Limiting slow unload handlers (Re: Back/forward cache for pages with unload handlers)

Greg Simon gregsimon at gmail.com
Wed Sep 16 15:53:04 PDT 2009


Besides JS executing, there are the asyc scheduled items that result
in JS executing (which in turn may trigger *more* JS to be run). I'm
talking specifically about HTML5 database tasks. If a page wants to
save some data to HTML5 db from an unload event, will/should that be
successful?  The unload script kill-timer would have to not only time
executing JS but be aware of native scheduled items that may not have
run yet.


On Wed, Sep 16, 2009 at 3:13 PM, Geoffrey Garen <ggaren at apple.com> wrote:
>> The better option, as Adam noted on the bug, is one in which the JS engine
>> itself measures how much work has been performed.  A count of instructions
>> or function calls is a truer measure than the proposed count of time checks,
>> but imposes costs on the JS engine that the V8 team have argued are
>> unacceptably high
>
> JavaScriptCore's timeout handling is not just wall-clock based. It measures
> a combination of wall-clock time and actual executed opcodes. This mechanism
> works with no measurable performance cost.
>
> Geoff
> _______________________________________________
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
> http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
>


More information about the webkit-dev mailing list