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

Maciej Stachowiak mjs at apple.com
Thu Sep 17 12:54:36 PDT 2009

On Sep 17, 2009, at 12:23 PM, Brady Eidson wrote:

> On Sep 17, 2009, at 2:28 AM, Maciej Stachowiak wrote:
>> Here's what would need to happen to let loads from unload run to  
>> completion:
>> 1) Implement a way to track all entities that start loads during  
>> unload (all owners of ResourceHandles, say).
>> 2) Add a way (perhaps via an abstract base class) for all such  
>> entities to release their ResourceHandle to another owner and then  
>> cancel themselves.
>> 3) Add code after unload finishes to create an object that takes  
>> ownership of all these ResourceHandles, and stays alive until they  
>> all complete their loads (dropping results on the floor).
> If there were pending loads when the user tries to quit the browser,  
> would we wait for each to finish or would we make the quit operation  
> wait on their completion?

I don't think quitting should wait. We might even want a hard timeout  
at some large value (like 60 seconds).

> Would the be a limit to how many pending pings could be in flight at  
> a given time?

Does there need to be a limit?

> Would you suggest that, as a best practice, the browser gives users  
> insight into this activity?

I'm not sure what kind of insight you have in mind.


More information about the webkit-dev mailing list