[WebGL] Check for existing buffer exists for enabled vertex array attributes before...
authorbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 11 Jul 2016 19:43:19 +0000 (19:43 +0000)
committerbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 11 Jul 2016 19:43:19 +0000 (19:43 +0000)
commitb3310942778a7c45392528965360b3e9e089a18d
tree7017c5ddba685319ad94f2d770bd085680563c95
parentac56f248cb5cca78695c2ae9804280accf1aff9f
[WebGL] Check for existing buffer exists for enabled vertex array attributes before permitting glDrawArrays to execute
https://bugs.webkit.org/show_bug.cgi?id=159590
<rdar://problem/26865535>

Reviewed by Dean Jackson.

Source/WebCore:

Test: fast/canvas/webgl/webgl-drawarrays-crash-2.html

* html/canvas/WebGLRenderingContextBase.cpp:
(WebCore::WebGLRenderingContextBase::validateVertexAttributes): If enabled array buffer attributes exist,
ensure that an array buffer has been bound.

LayoutTests:

* fast/canvas/webgl/webgl-drawarrays-crash-2-expected.txt: Added.
* fast/canvas/webgl/webgl-drawarrays-crash-2.html: Added.

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