On 12/24/13 11:03 AM, Daniel Micay wrote:
On Tue, Dec 24, 2013 at 1:56 PM, Patrick Walton <pwal...@mozilla.com> wrote:
I think we need them to handle the Web semantics though. We can't just drop
input events.

It would be better to use a bounded queue and report an error when it
gets to megabytes or gigabytes in size than going out-of-memory
though. A user will prefer a clean exit of the tab or browser compared
to it becoming locked because the events aren't being promptly
handled or it causing a significant system performance degradation
ending with the browser being killed.

This is just one specific case of out-of-memory, though. I would rather handle the problem of too much resource consumption in some generic way: input event floods can cause OOM, sure, but so can an infinite loop creating DOM objects, or an infinite loop filling the user's history with a flood of URLs, or any number of other things.

I haven't heard of input event flooding causing OOM being a problem in practice, though I could be wrong of course.

A quick search suggests that Qt's event queue is unbounded.

Patrick

_______________________________________________
Rust-dev mailing list
Rust-dev@mozilla.org
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to