Closed Bug 1751816 Opened 3 years ago Closed 3 years ago

Improve error handling in GLContextEGL::CreateCompatibleSurface

Categories

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

task

Tracking

()

RESOLVED FIXED
98 Branch
Tracking Status
firefox98 --- fixed

People

(Reporter: aosmond, Assigned: aosmond)

References

Details

Attachments

(1 file)

There is a somewhat common crash in nightly/beta/release for Android users as tracked in bug 1746354 here:

https://searchfox.org/mozilla-central/rev/aecfc48870599adb0ffc077dd11e6e2d99820d38/gfx/gl/GLContextProviderEGL.cpp#1024

If we just returned nullptr, we would just gracefully tear down the context:

https://searchfox.org/mozilla-central/rev/aecfc48870599adb0ffc077dd11e6e2d99820d38/dom/canvas/WebGLContext.cpp#848

which is probably more user friendly than just crashing. However it would be good to collect why this is failing. If we crash via gfxCriticalError, we could crash nightly and dump the error code to the critical log, and just lose the context on beta/release.

Rather than just crashing, if we return a nullptr in
CreateCompatibleSurface, then we will just cause a context loss for
WebGL instances. This would be better for beta/release than just
crashing the content process on the user.

So that we can get a sense of what errors are causing this, we should
record it to the critical log. This will still crash on nightly as well
so we should get the reports.

Pushed by aosmond@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/dd2af9af327b Improve error handling in GLContextEGL::CreateCompatibleSurface. r=jgilbert
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 98 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: