gecko-dev/dom/media/webvtt
alwu 104f98fb8c Bug 1580015 - part1 : do not reentry function 'processCues()'. r=heycam
Accessing `offsetXXX` attributes of element, it would trigger reflow, and sometime it would result in a re-entry of `processCue()` because we would call `processCue()` when `resizecaption` occurs.

One specifical case is that, assigning CSS properties `min-width` and `max-width` at the same video element, in thise case, when we re-enter the `processCues()` and access `offsetXXX`. It seems that the layout system would reprocess those properites again and again and dispatch `resizecaption` when we access `offsetXXX`, which causes an infinite loop, starting from receving `resizecaption`, then calling `processCue()`, accessing `offSetXXX`, triggering reflow, sending `resizecaption` event again.

Therefore, we should stop revisiting `processCues()` if we're already running a processing, we should run a processing once at a time.

Differential Revision: https://phabricator.services.mozilla.com/D45421

--HG--
extra : moz-landing-system : lando
2019-09-12 08:13:46 +00:00
..
tests
WebVTTParserWrapper.jsm Bug 1562021 - part3 : cancel old VTT listener when we start a new load. r=jya,baku 2019-07-03 23:23:29 +00:00
components.conf
moz.build
nsIWebVTTListener.idl
nsIWebVTTParserWrapper.idl Bug 1562021 - part3 : cancel old VTT listener when we start a new load. r=jya,baku 2019-07-03 23:23:29 +00:00
package.json
update-webvtt.js
vtt.jsm Bug 1580015 - part1 : do not reentry function 'processCues()'. r=heycam 2019-09-12 08:13:46 +00:00