Changeset 221008 in webkit


Ignore:
Timestamp:
Aug 22, 2017 2:51:22 AM (7 years ago)
Author:
zandobersek@gmail.com
Message:

GLContext: zero-initialize the GLContext pointer in ThreadGlobalGLContext
https://bugs.webkit.org/show_bug.cgi?id=175819

Reviewed by Xabier Rodriguez-Calvar.

  • platform/graphics/GLContext.cpp: The ThreadGlobalGLContext object is

allocated on heap, so the embedded GLContext pointer can contain a
non-null value that can cause problems when e.g. checking for a current
GLContext on some specific thread on which a GLContext hasn't yet been
made current. Zero-initializing this pointer will avoid false positives
that can occur in these circumstances.

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r220998 r221008  
     12017-08-22  Zan Dobersek  <zdobersek@igalia.com>
     2
     3        GLContext: zero-initialize the GLContext pointer in ThreadGlobalGLContext
     4        https://bugs.webkit.org/show_bug.cgi?id=175819
     5
     6        Reviewed by Xabier Rodriguez-Calvar.
     7
     8        * platform/graphics/GLContext.cpp: The ThreadGlobalGLContext object is
     9        allocated on heap, so the embedded GLContext pointer can contain a
     10        non-null value that can cause problems when e.g. checking for a current
     11        GLContext on some specific thread on which a GLContext hasn't yet been
     12        made current. Zero-initializing this pointer will avoid false positives
     13        that can occur in these circumstances.
     14
    1152017-08-21  Youenn Fablet  <youenn@apple.com>
    216
  • trunk/Source/WebCore/platform/graphics/GLContext.cpp

    r219391 r221008  
    5151
    5252private:
    53     GLContext* m_context;
     53    GLContext* m_context { nullptr };
    5454};
    5555
Note: See TracChangeset for help on using the changeset viewer.