Improve error message when passing a null ArrayBuffer to bufferData()
authormmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 20 Oct 2016 19:17:06 +0000 (19:17 +0000)
committermmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 20 Oct 2016 19:17:06 +0000 (19:17 +0000)
commit86fdfc2f01f9ef05f0b141af440447aba647809f
treeee213ac6a907c0fb8f78800ed77088a040bf8a2c
parented90e1e3e0e79d70bad192ef26cd4778b6b3f292
Improve error message when passing a null ArrayBuffer to bufferData()
https://bugs.webkit.org/show_bug.cgi?id=163745

Reviewed by Dean Jackson.

Source/WebCore:

Test: fast/canvas/webgl/bufferData-nullable-array-buffer-view.html

Update the idl file to accept a nullable ArrayBuffer, and throw
the relevant error with a more helpful error string.

* html/canvas/WebGLRenderingContextBase.cpp:
(WebCore::WebGLRenderingContextBase::bufferData):
* html/canvas/WebGLRenderingContextBase.h:
* html/canvas/WebGLRenderingContextBase.idl:

LayoutTests:

* fast/canvas/webgl/bufferData-nullable-array-buffer-view-expected.txt: Added.
* fast/canvas/webgl/bufferData-nullable-array-buffer-view.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@207632 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/canvas/webgl/bufferData-nullable-array-buffer-view-expected.txt [new file with mode: 0644]
LayoutTests/fast/canvas/webgl/bufferData-nullable-array-buffer-view.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp
Source/WebCore/html/canvas/WebGLRenderingContextBase.h
Source/WebCore/html/canvas/WebGLRenderingContextBase.idl