It's not entirely clear how and what exactly we want to notify. This feels like a system intent-y kind of thing that we would want to dispatch to the homescreen/launcher/task manager.
I think the browser API should do this. jlebar?
(In reply to Andreas Gal :gal from comment #1) > I think the browser API should do this. jlebar? What about installed apps? If one of those go rogue, I'd want the OS to give me the option to kill it, too.
Those are within frame mozapp too no?
(In reply to Andreas Gal :gal from comment #3) > Those are within frame mozapp too no? Oh duh, right. Yeah, having an API on the iframe would totally work.
(In reply to Andreas Gal :gal from comment #1) > I think the browser API should do this. jlebar? mozbrowser API, agreed.
How important is this? If every app runs in its own process, an unresponsive script won't freeze my phone. Wouldn't this be like Windows popping up a dialog saying "X process is using a lot of CPU; do you want to kill it?" Not to say we shouldn't do this; just want to get an idea of its priority.
For end users, there should be UI indication to know the app has been unresponsive and kill the app. From developer perspective, need some logging to know where the script is stuck so that this can be debugged and fixed(adding the unresponsive script callstack to the logcat/separate error file). If there is a notification in the system when a script is unresponsive, that would be great for some other listener app that can hook into this notification and do the necessary log collection.
Important content use case (content doesn't monitor itself) where current "workaround" (kill app in task switcher) may not be obvious.