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