[Webkit-unassigned] [Bug 106587] New: HTMLMediaElement::resume() should schedule a load rather than load immediately

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jan 10 11:42:21 PST 2013


https://bugs.webkit.org/show_bug.cgi?id=106587

           Summary: HTMLMediaElement::resume() should schedule a load
                    rather than load immediately
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Unspecified
        OS/Version: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Media Elements
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: yoli at rim.com


Generally, those resume() methods should only schedule the resumed jobs by timers. This is because:

1) It is not always safe to start the jobs at the time resume() is called. That is why the jobs are suspended.

For example, when ActiveDOMObjects are suspended for nested event loop, the sequence is like this:

- The stack is on top of document parsing, javascript execution, so it is not safe to run some jobs in the nested event loop.
- suspend all scheduled jobs so they won't run in the event loop
- run the nested event loop
- resume (re-schedule those jobs). However, it is still not safe at this point to run those jobs!
...
- Stack unwinds back to main event loop
....
- Timers fire and scheduled jobs get done.

Another case is PageCache. ActiveDOMObjects are suspended while a document is in the page cache. When it is being restored, resume() is called upon every ActiveDOMObject. However I don't think the page is guaranteed ready at this point to start the resumed jobs immediately.

2) It is also good for performance, as the objects may be suspended again after being resumed.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list