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

Changeset 242826 in webkit


Ignore:
Timestamp:
Mar 12, 2019, 1:57:43 PM (7 years ago)
Author:
dino@apple.com
Message:

[WebGL] WebGLBuffer can be too large
https://bugs.webkit.org/show_bug.cgi?id=195068
<rdar://problem/48414289>

Reviewed by Antoine Quint.

Source/WebCore:

When creating an element array buffer, make sure to
test against the maximum size of an ArrayBuffer, rather
than just assume it can be created.

Test: fast/canvas/webgl/largeBuffer.html

  • html/canvas/WebGLBuffer.cpp:

(WebCore::WebGLBuffer::associateBufferDataImpl):

LayoutTests:

  • fast/canvas/webgl/largeBuffer-expected.txt: Added.
  • fast/canvas/webgl/largeBuffer.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r242813 r242826  
     12019-03-12  Dean Jackson  <dino@apple.com>
     2
     3        [WebGL] WebGLBuffer can be too large
     4        https://bugs.webkit.org/show_bug.cgi?id=195068
     5        <rdar://problem/48414289>
     6
     7        Reviewed by Antoine Quint.
     8
     9        * fast/canvas/webgl/largeBuffer-expected.txt: Added.
     10        * fast/canvas/webgl/largeBuffer.html: Added.
     11
    1122019-03-12  Ryan Haddad  <ryanhaddad@apple.com>
    213
  • trunk/Source/WebCore/ChangeLog

    r242818 r242826  
     12019-03-12  Dean Jackson  <dino@apple.com>
     2
     3        [WebGL] WebGLBuffer can be too large
     4        https://bugs.webkit.org/show_bug.cgi?id=195068
     5        <rdar://problem/48414289>
     6
     7        Reviewed by Antoine Quint.
     8
     9        When creating an element array buffer, make sure to
     10        test against the maximum size of an ArrayBuffer, rather
     11        than just assume it can be created.
     12
     13        Test: fast/canvas/webgl/largeBuffer.html
     14
     15        * html/canvas/WebGLBuffer.cpp:
     16        (WebCore::WebGLBuffer::associateBufferDataImpl):
     17
    1182019-03-12  Sihui Liu  <sihui_liu@apple.com>
    219
  • trunk/Source/WebCore/html/canvas/WebGLBuffer.cpp

    r239427 r242826  
    6363    switch (m_target) {
    6464    case GraphicsContext3D::ELEMENT_ARRAY_BUFFER:
     65        if (byteLength > std::numeric_limits<unsigned>::max())
     66            return false;
    6567        m_byteLength = byteLength;
    6668        clearCachedMaxIndices();
Note: See TracChangeset for help on using the changeset viewer.