[WebGL] WebGLBuffer can be too large
authordino@apple.com <dino@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 12 Mar 2019 20:57:43 +0000 (20:57 +0000)
committerdino@apple.com <dino@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 12 Mar 2019 20:57:43 +0000 (20:57 +0000)
commitf9e50065f12fbd7fc57b48992cafe3e0c0275c9b
tree047837a1a77a69f94eeb8ad656318beb15146482
parent89d4dfdd29e987a19cfbd6e712919fc7017a4852
[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.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@242826 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/canvas/webgl/largeBuffer-expected.txt [new file with mode: 0644]
LayoutTests/fast/canvas/webgl/largeBuffer.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/html/canvas/WebGLBuffer.cpp