summaryrefslogtreecommitdiffstats
path: root/WebCore/bindings/js/JSWebGLUnsignedShortArrayConstructor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/bindings/js/JSWebGLUnsignedShortArrayConstructor.cpp')
-rw-r--r--WebCore/bindings/js/JSWebGLUnsignedShortArrayConstructor.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/WebCore/bindings/js/JSWebGLUnsignedShortArrayConstructor.cpp b/WebCore/bindings/js/JSWebGLUnsignedShortArrayConstructor.cpp
index deaeffd..d8c2cfb 100644
--- a/WebCore/bindings/js/JSWebGLUnsignedShortArrayConstructor.cpp
+++ b/WebCore/bindings/js/JSWebGLUnsignedShortArrayConstructor.cpp
@@ -53,6 +53,10 @@ static JSObject* constructCanvasUnsignedShortArray(ExecState* exec, JSObject* co
{
JSWebGLUnsignedShortArrayConstructor* jsConstructor = static_cast<JSWebGLUnsignedShortArrayConstructor*>(constructor);
RefPtr<WebGLUnsignedShortArray> array = static_cast<WebGLUnsignedShortArray*>(construct<WebGLUnsignedShortArray, unsigned short>(exec, args).get());
+ if (!array.get()) {
+ setDOMException(exec, INDEX_SIZE_ERR);
+ return 0;
+ }
return asObject(toJS(exec, jsConstructor->globalObject(), array.get()));
}