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

NEW
Unassigned

Status

()

Core
DOM
P3
normal
2 years ago
6 months ago

People

(Reporter: xidorn, Unassigned)

Tracking

(Blocks: 1 bug)

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

2 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.
(Reporter)

Updated

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

Updated

2 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)
(Reporter)

Comment 5

7 months 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)
(Reporter)

Updated

6 months ago
See Also: → bug 1413157
You need to log in before you can comment on or make changes to this bug.