⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 281613 in webkit


Ignore:
Timestamp:
Aug 25, 2021, 8:37:36 PM (5 years ago)
Author:
commit-queue@webkit.org
Message:

Crash in GraphicsContextGLOpenGL::reshapeDisplayBufferBacking
https://bugs.webkit.org/show_bug.cgi?id=229309

Patch by Alex Christensen <achristensen@webkit.org> on 2021-08-25
Reviewed by Myles C. Maxfield.

Source/WebCore:

Test: fast/canvas/xr-compatible-crash.html

Null check m_swapChain because reshapeDisplayBufferBacking can be called before it is set.

  • html/canvas/WebGLRenderingContextBase.cpp:

(WebCore::WebGLRenderingContextBase::addContextObject):

  • platform/graphics/angle/GraphicsContextGLANGLE.cpp:

(WebCore::GraphicsContextGLOpenGL::reshapeFBOs):

  • platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm:

(WebCore::GraphicsContextGLOpenGL::reshapeDisplayBufferBacking):

LayoutTests:

  • fast/canvas/xr-compatible-crash.html: Added.
  • fast/canvas/xr-compatible-crash-expected.txt: Added.
Location:
trunk
Files:
2 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r281612 r281613  
     12021-08-25  Alex Christensen  <achristensen@webkit.org>
     2
     3        Crash in GraphicsContextGLOpenGL::reshapeDisplayBufferBacking
     4        https://bugs.webkit.org/show_bug.cgi?id=229309
     5
     6        Reviewed by Myles C. Maxfield.
     7
     8        * fast/canvas/xr-compatible-crash.html: Added.
     9        * fast/canvas/xr-compatible-crash-expected.txt: Added.
     10
    1112021-08-25  Aditya Keerthi  <akeerthi@apple.com>
    212
  • trunk/Source/WebCore/ChangeLog

    r281610 r281613  
     12021-08-25  Alex Christensen  <achristensen@webkit.org>
     2
     3        Crash in GraphicsContextGLOpenGL::reshapeDisplayBufferBacking
     4        https://bugs.webkit.org/show_bug.cgi?id=229309
     5
     6        Reviewed by Myles C. Maxfield.
     7
     8        Test: fast/canvas/xr-compatible-crash.html
     9
     10        Null check m_swapChain because reshapeDisplayBufferBacking can be called before it is set.
     11
     12        * html/canvas/WebGLRenderingContextBase.cpp:
     13        (WebCore::WebGLRenderingContextBase::addContextObject):
     14        * platform/graphics/angle/GraphicsContextGLANGLE.cpp:
     15        (WebCore::GraphicsContextGLOpenGL::reshapeFBOs):
     16        * platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm:
     17        (WebCore::GraphicsContextGLOpenGL::reshapeDisplayBufferBacking):
     18
    1192021-08-25  Wenson Hsieh  <wenson_hsieh@apple.com>
    220
  • trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp

    r281245 r281613  
    63376337        return;
    63386338
    6339     ASSERT(!isContextLost());
    63406339    m_contextObjects.add(&object);
    63416340}
  • trunk/Source/WebCore/platform/graphics/angle/GraphicsContextGLANGLE.cpp

    r279883 r281613  
    150150    // resize regular FBO
    151151    gl::BindFramebuffer(GL_FRAMEBUFFER, m_fbo);
    152     ASSERT(m_texture);
    153152
    154153#if PLATFORM(COCOA)
  • trunk/Source/WebCore/platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm

    r281124 r281613  
    622622    }
    623623    // Reset the future recycled buffer now, because it most likely will not be reusable at the time it will be reused.
    624     auto recycledBuffer = m_swapChain->recycleBuffer();
    625     if (recycledBuffer.handle)
    626         EGL_DestroySurface(m_displayObj, recycledBuffer.handle);
    627     recycledBuffer.surface.reset();
     624    if (m_swapChain) {
     625        auto recycledBuffer = m_swapChain->recycleBuffer();
     626        if (recycledBuffer.handle)
     627            EGL_DestroySurface(m_displayObj, recycledBuffer.handle);
     628        recycledBuffer.surface.reset();
     629    }
    628630    return allocateAndBindDisplayBufferBacking();
    629631}
Note: See TracChangeset for help on using the changeset viewer.