DescriptionPrevent GC of media elements that are delaying the load event
The spec requires that "only once a media element is in a state where no
further audio could ever be played by that element may the element be
garbage collected."
The delaying-the-load-event flag is true early during resource
selection, typically until after the loadeddata event is fired.
Preventing GC in this time frame means that the loadedmetadata and
loadeddata events will be fired reliably.
Note that it's still possible to write unreliable code e.g. by using
preload=auto and calling play() in a canplaythrough event handler, but
making that reliable requires loading potentially large amounts of data
that may not ever be used. A spec bug for clarification was filed:
https://www.w3.org/Bugs/Public/show_bug.cgi?id=26515
TEST=LayoutTests/media/gc-during-load.html
TEST=LayoutTests/media/avtrack/addtrack.html (no longer flaky)
BUG=397324
Patch Set 1 #
Messages
Total messages: 5 (0 generated)
|