Open Bug 1633311 Opened 4 years ago Updated 4 years ago

Don't warn about irrelevant WebGL context lost

Categories

(Core :: Graphics: CanvasWebGL, enhancement, P3)

enhancement

Tracking

()

UNCONFIRMED

People

(Reporter: mozilla2, Unassigned)

Details

Attachments

(1 file)

Attached file issue.html

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.122 Safari/537.36

Steps to reproduce:

  • run the attached sample
  • open the web console
  • reload

Actual results:

These superfluous warnings are printed

Exceeded 16 live WebGL contexts for this principal, losing the least recently used one. issue.html:7:21
WebGL context was lost.

Expected results:

There should be no warnings. "This prinicple" is not using 16 live WebGL contexts. Those warnings are about contexts from the previous page. The user has done nothing wrong. These warnings cause active harm in that new devs think they are doing something wrong when they start seeing the warnings and then flock to Q&A sites asking how to prevent them.

There are 2 warnings

  1. Exceeded 16 live WebGL contexts for this principal, losing the least recently used one

This message should only be printed if the user creates 16 LIVE contexts. If they create a context and then lose all references to it (take it out of the DOM, have no variables) then they should be able to create and destroy contexts forever and never get this message. Context on previous pages because you reloaded or visited another page on the same site in the same tab shuld never generate this message. It's only correct if the context is "LIVE" and "LIVE" should arguably mean "context I still have a reference do and can therefore do something about"

  1. WebGL context was lost.

This message should only be printed if that context is LIVE. If the user no longer has a reference it's a non useful and misleading warning. Misleading because it's a "warning" as in "warning! you're doing something wrong". But the user is not doing anything wrong. In fact there is no action they can take to prevent this warning. See issue.html

Note the example creates 9 contexts but you can create just 1 context, you'll just have to reload the page 17 times.

Summary: Don't warning above irrelevant WebGL context lost → Don't warn about irrelevant WebGL context lost

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

Component: Untriaged → Canvas: WebGL
Product: Firefox → Core

The priority flag is not set for this bug.
:jgilbert, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(jgilbert)

Because this bug's Severity has not been changed from the default since it was filed, and it's Priority is -- (non,) indicating it has has not been previously triaged, the bug's Severity is being updated to -- (default, untriaged.)

Severity: normal → --
Severity: -- → S4
Type: defect → enhancement
Flags: needinfo?(jgilbert)
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: