[webkit-changes] [WebKit/WebKit] b7d555: [GTK] Crash in Nicosia::GC3DLayer::makeContextCurr...

Carlos Garcia Campos noreply at github.com
Tue Sep 6 02:17:18 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: b7d555805988f56bc97e9ae21014a35a463b1987
      https://github.com/WebKit/WebKit/commit/b7d555805988f56bc97e9ae21014a35a463b1987
  Author: Carlos Garcia Campos <cgarcia at igalia.com>
  Date:   2022-09-06 (Tue, 06 Sep 2022)

  Changed paths:
    M Source/WebCore/platform/graphics/nicosia/texmap/NicosiaGCGLLayer.cpp
    M Source/WebCore/platform/graphics/nicosia/texmap/NicosiaGCGLLayer.h
    M Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGL.cpp

  Log Message:
  -----------
  [GTK] Crash in Nicosia::GC3DLayer::makeContextCurrent, failure to play fullscreen video due to failure in EGL display creation
https://bugs.webkit.org/show_bug.cgi?id=201507

Reviewed by Žan Doberšek.

NicosiaGCGLLayer assumes the creation of the GL context can't fail and
we end up crashing when that happens for whatever reason.

* Source/WebCore/platform/graphics/nicosia/texmap/NicosiaGCGLLayer.cpp:
(Nicosia::GCGLLayer::create): Create the GL context and return nullptr
if it fails, otherwise pass it to the constructor.
(Nicosia::GCGLLayer::GCGLLayer): Receive the GL context as parameter too.
* Source/WebCore/platform/graphics/nicosia/texmap/NicosiaGCGLLayer.h:
* Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGL.cpp:
(WebCore::GraphicsContextGLOpenGL::GraphicsContextGLOpenGL): Do not
initialize the context here, move it to initialize().
(WebCore::GraphicsContextGLOpenGL::~GraphicsContextGLOpenGL): Return
early if makeContextCurrent() returns false.
(WebCore::GraphicsContextGLOpenGL::initialize): Move initialization
here, returning false if context creation or making the context current fails.
(WebCore::GraphicsContextGLOpenGL::makeContextCurrent): Null check m_nicosiaLayer.

Canonical link: https://commits.webkit.org/254183@main




More information about the webkit-changes mailing list