Bug 24030

Summary: Amalgamate suspendActiveDOMObjects/resumeActiveDOMObjects and documentWillBecomeInactive/documentDidBecomeActive?
Product: WebKit Reporter: Simon Fraser (smfr) <simon.fraser>
Component: DOMAssignee: 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)
Reported 2009-02-19 10:57:42 PST
suspendActiveDOMObjects/resumeActiveDOMObjects and documentWillBecomeInactive/documentDidBecomeActive do something very similar. Perhaps they should be one and the same?
Attachments
Dmitry Titov
Comment 1 2011-01-28 14:23:49 PST
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
Comment 2 2011-01-28 14:26:49 PST
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).
Note You need to log in before you can comment on or make changes to this bug.