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

Changeset 283346 in webkit


Ignore:
Timestamp:
Sep 30, 2021, 4:12:17 PM (5 years ago)
Author:
Russell Epstein
Message:

Cherry-pick r281613. rdar://problem/83369963

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.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281613 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Location:
branches/safari-611.4.2.0-branch
Files:
2 added
5 edited

Legend:

Unmodified
Added
Removed
  • branches/safari-611.4.2.0-branch/LayoutTests/ChangeLog

    r279077 r283346  
     12021-09-30  Russell Epstein  <repstein@apple.com>
     2
     3        Cherry-pick r281613. rdar://problem/83369963
     4
     5    Crash in GraphicsContextGLOpenGL::reshapeDisplayBufferBacking
     6    https://bugs.webkit.org/show_bug.cgi?id=229309
     7   
     8    Patch by Alex Christensen <achristensen@webkit.org> on 2021-08-25
     9    Reviewed by Myles C. Maxfield.
     10   
     11    Source/WebCore:
     12   
     13    Test: fast/canvas/xr-compatible-crash.html
     14   
     15    Null check m_swapChain because reshapeDisplayBufferBacking can be called before it is set.
     16   
     17    * html/canvas/WebGLRenderingContextBase.cpp:
     18    (WebCore::WebGLRenderingContextBase::addContextObject):
     19    * platform/graphics/angle/GraphicsContextGLANGLE.cpp:
     20    (WebCore::GraphicsContextGLOpenGL::reshapeFBOs):
     21    * platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm:
     22    (WebCore::GraphicsContextGLOpenGL::reshapeDisplayBufferBacking):
     23   
     24    LayoutTests:
     25   
     26    * fast/canvas/xr-compatible-crash.html: Added.
     27    * fast/canvas/xr-compatible-crash-expected.txt: Added.
     28   
     29    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281613 268f45cc-cd09-0410-ab3c-d52691b4dbfc
     30
     31    2021-08-25  Alex Christensen  <achristensen@webkit.org>
     32
     33            Crash in GraphicsContextGLOpenGL::reshapeDisplayBufferBacking
     34            https://bugs.webkit.org/show_bug.cgi?id=229309
     35
     36            Reviewed by Myles C. Maxfield.
     37
     38            * fast/canvas/xr-compatible-crash.html: Added.
     39            * fast/canvas/xr-compatible-crash-expected.txt: Added.
     40
    1412021-06-21  Alan Coon  <alancoon@apple.com>
    242
  • branches/safari-611.4.2.0-branch/Source/WebCore/ChangeLog

    r283345 r283346  
     12021-09-30  Russell Epstein  <repstein@apple.com>
     2
     3        Cherry-pick r281613. rdar://problem/83369963
     4
     5    Crash in GraphicsContextGLOpenGL::reshapeDisplayBufferBacking
     6    https://bugs.webkit.org/show_bug.cgi?id=229309
     7   
     8    Patch by Alex Christensen <achristensen@webkit.org> on 2021-08-25
     9    Reviewed by Myles C. Maxfield.
     10   
     11    Source/WebCore:
     12   
     13    Test: fast/canvas/xr-compatible-crash.html
     14   
     15    Null check m_swapChain because reshapeDisplayBufferBacking can be called before it is set.
     16   
     17    * html/canvas/WebGLRenderingContextBase.cpp:
     18    (WebCore::WebGLRenderingContextBase::addContextObject):
     19    * platform/graphics/angle/GraphicsContextGLANGLE.cpp:
     20    (WebCore::GraphicsContextGLOpenGL::reshapeFBOs):
     21    * platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm:
     22    (WebCore::GraphicsContextGLOpenGL::reshapeDisplayBufferBacking):
     23   
     24    LayoutTests:
     25   
     26    * fast/canvas/xr-compatible-crash.html: Added.
     27    * fast/canvas/xr-compatible-crash-expected.txt: Added.
     28   
     29    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281613 268f45cc-cd09-0410-ab3c-d52691b4dbfc
     30
     31    2021-08-25  Alex Christensen  <achristensen@webkit.org>
     32
     33            Crash in GraphicsContextGLOpenGL::reshapeDisplayBufferBacking
     34            https://bugs.webkit.org/show_bug.cgi?id=229309
     35
     36            Reviewed by Myles C. Maxfield.
     37
     38            Test: fast/canvas/xr-compatible-crash.html
     39
     40            Null check m_swapChain because reshapeDisplayBufferBacking can be called before it is set.
     41
     42            * html/canvas/WebGLRenderingContextBase.cpp:
     43            (WebCore::WebGLRenderingContextBase::addContextObject):
     44            * platform/graphics/angle/GraphicsContextGLANGLE.cpp:
     45            (WebCore::GraphicsContextGLOpenGL::reshapeFBOs):
     46            * platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm:
     47            (WebCore::GraphicsContextGLOpenGL::reshapeDisplayBufferBacking):
     48
    1492021-09-30  Russell Epstein  <repstein@apple.com>
    250
  • branches/safari-611.4.2.0-branch/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp

    r272279 r283346  
    62486248        return;
    62496249
    6250     ASSERT(!isContextLost());
    62516250    m_contextObjects.add(&object);
    62526251}
  • branches/safari-611.4.2.0-branch/Source/WebCore/platform/graphics/angle/GraphicsContextGLANGLE.cpp

    r270964 r283346  
    166166    // resize regular FBO
    167167    gl::BindFramebuffer(GL_FRAMEBUFFER, m_fbo);
    168     ASSERT(m_texture);
    169168
    170169#if PLATFORM(COCOA)
  • branches/safari-611.4.2.0-branch/Source/WebCore/platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm

    r272279 r283346  
    519519    }
    520520    // Reset the future recycled buffer now, because it most likely will not be reusable at the time it will be reused.
    521     auto recycledBuffer = m_swapChain->recycleBuffer();
    522     if (recycledBuffer.handle)
    523         EGL_DestroySurface(m_displayObj, recycledBuffer.handle);
    524     recycledBuffer.surface.reset();
     521    if (m_swapChain) {
     522        auto recycledBuffer = m_swapChain->recycleBuffer();
     523        if (recycledBuffer.handle)
     524            EGL_DestroySurface(m_displayObj, recycledBuffer.handle);
     525        recycledBuffer.surface.reset();
     526    }
    525527    return allocateAndBindDisplayBufferBacking();
    526528}
Note: See TracChangeset for help on using the changeset viewer.