diff options
Diffstat (limited to 'WebCore/bindings/js/JSWebGLShortArrayConstructor.cpp')
-rw-r--r-- | WebCore/bindings/js/JSWebGLShortArrayConstructor.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/WebCore/bindings/js/JSWebGLShortArrayConstructor.cpp b/WebCore/bindings/js/JSWebGLShortArrayConstructor.cpp index 74bfe5c..a33779b 100644 --- a/WebCore/bindings/js/JSWebGLShortArrayConstructor.cpp +++ b/WebCore/bindings/js/JSWebGLShortArrayConstructor.cpp @@ -54,6 +54,10 @@ static JSObject* constructCanvasShortArray(ExecState* exec, JSObject* constructo { JSWebGLShortArrayConstructor* jsConstructor = static_cast<JSWebGLShortArrayConstructor*>(constructor); RefPtr<WebGLShortArray> array = static_cast<WebGLShortArray*>(construct<WebGLShortArray, short>(exec, args).get()); + if (!array.get()) { + setDOMException(exec, INDEX_SIZE_ERR); + return 0; + } return asObject(toJS(exec, jsConstructor->globalObject(), array.get())); } |