Bug 24030
Summary: | Amalgamate suspendActiveDOMObjects/resumeActiveDOMObjects and documentWillBecomeInactive/documentDidBecomeActive? | ||
---|---|---|---|
Product: | WebKit | Reporter: | Simon Fraser (smfr) <simon.fraser> |
Component: | DOM | Assignee: | Nobody <webkit-unassigned> |
Status: | NEW | ||
Severity: | Normal | CC: | ap, dimich, eric.carlson, jorlow, mihaip, psolanki |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | Mac | ||
OS: | OS X 10.5 |
Simon Fraser (smfr)
suspendActiveDOMObjects/resumeActiveDOMObjects and documentWillBecomeInactive/documentDidBecomeActive do something very similar. Perhaps they should be one and the same?
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Dmitry Titov
Indeed. Perhaps it makes sense to split ActiveDOMObject into 2 parts - the more generic interface like ScriptExecutionContextObserver (name?) that would receive stop/start/canSuspend/suspend/resume/contextDestroyed, and a PendingActivity object that would have hasPendingActivity (with counter) and optionally register with the list on SEC to keep their wrappers alive.
By splitting observer-like functionality from ActiveDOMObject, we would be able to have observers that don't have JS wrappers or a notion of pending activity.
Old ActiveDOMObjects would derive from both, while things like HTMLInputElement could only be an observer.
What do you think?
Jeremy Orlow
For the record, https://bugs.webkit.org/show_bug.cgi?id=53202 has some similar discussion....but yeah, I think that's probably the right basic concept.
We should probably also add a comment to ActiveDOMObject to make it more clear what it should be used for (and what an "active dom object" really means/implies).