diff options
Diffstat (limited to 'WebCore/bindings/js/JSWebGLIntArrayConstructor.cpp')
-rw-r--r-- | WebCore/bindings/js/JSWebGLIntArrayConstructor.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/WebCore/bindings/js/JSWebGLIntArrayConstructor.cpp b/WebCore/bindings/js/JSWebGLIntArrayConstructor.cpp index f2a0922..5b14803 100644 --- a/WebCore/bindings/js/JSWebGLIntArrayConstructor.cpp +++ b/WebCore/bindings/js/JSWebGLIntArrayConstructor.cpp @@ -53,6 +53,10 @@ static JSObject* constructCanvasIntArray(ExecState* exec, JSObject* constructor, { JSWebGLIntArrayConstructor* jsConstructor = static_cast<JSWebGLIntArrayConstructor*>(constructor); RefPtr<WebGLIntArray> array = static_cast<WebGLIntArray*>(construct<WebGLIntArray, int>(exec, args).get()); + if (!array.get()) { + setDOMException(exec, INDEX_SIZE_ERR); + return 0; + } return asObject(toJS(exec, jsConstructor->globalObject(), array.get())); } |