Further limit the stack size inside handler of fullscreenchange to workaround infinite recursion in video.js




3 years ago
3 months ago


(Reporter: xidorn, Unassigned)


Firefox Tracking Flags

(Not tracked)




3 years ago
Video.js version 4.7~4.12 have a bug which causes infinite recursion in fullscreenchange event handler when unprefix Fullscreen API is available.

This issue doesn't break websites' function a lot, but it makes fullscreen transition fairly slow especially for single process Firefox.

We may want to limit the recursion level to make it fail faster to workaround this issue.


3 years ago
Flags: needinfo?(ehsan)
Whiteboard: btpp-fixlater


3 years ago
Blocks: 1269276
Henri has recently looked at recursion depth limits elsewhere so may have informed thoughts here.
Flags: needinfo?(ehsan) → needinfo?(hsivonen)
Priority: -- → P3
Whiteboard: btpp-fixlater
I want to make our recursion limit for C++ higher. This bug asks for JavaScript recursion limit to be made lower.

I don't have insight beyond a recollection that :jandem might have sought to increase the JS recursion limit.
Flags: needinfo?(hsivonen) → needinfo?(jdemooij)
This was filed 2 years ago, is this still a problem or should we close this?

Regarding JS stack quota:

* On Linux our (JS) recursion limit is too low and it's breaking stuff - we're working on fixing that in bug 1412773, bug 1244280.

* I changed our recursion limit on Windows a while ago and we shouldn't decrease it or we will run into problems. See bug 1257234 and the bugs it blocks.

* On Mac we could potentially lower our recursion limit because we use the full 8 MB now.
Flags: needinfo?(jdemooij)
(for comment 3)
Flags: needinfo?(xidorn+moz)

Comment 5

2 years ago
This bug is nothing about JS stack quota or reduce the recursion limit in general. It is about lowering JS recursion limit in the very specific case when we are handling fullscreenchange event.

As I've described in comment 0, we want this because some versions of video.js, a somehow widely used video player, has a bug that it causes infinite recursion when unprefixed fullscreen API is enabled. We want the infinite recursion to end faster rather than blocking the browser for seconds.

If may be non-relevant anymore if those affected versions have all gone. But we don't know whether all websites have moved from the affected versions.
Flags: needinfo?(xidorn+moz)


2 years ago
See Also: → 1413157
Component: DOM → DOM: Core & HTML
Product: Core → Core
You need to log in before you can comment on or make changes to this bug.