diff options
Diffstat (limited to 'WebCore/bindings/js/JSUint32ArrayCustom.cpp')
-rw-r--r-- | WebCore/bindings/js/JSUint32ArrayCustom.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/WebCore/bindings/js/JSUint32ArrayCustom.cpp b/WebCore/bindings/js/JSUint32ArrayCustom.cpp index 2826b6a..31ec8cb 100644 --- a/WebCore/bindings/js/JSUint32ArrayCustom.cpp +++ b/WebCore/bindings/js/JSUint32ArrayCustom.cpp @@ -51,6 +51,16 @@ JSC::JSValue JSUint32Array::set(JSC::ExecState* exec) return setWebGLArrayHelper(exec, impl(), toUint32Array); } +EncodedJSValue JSC_HOST_CALL JSUint32ArrayConstructor::constructJSUint32Array(ExecState* exec) +{ + JSUint32ArrayConstructor* jsConstructor = static_cast<JSUint32ArrayConstructor*>(exec->callee()); + RefPtr<Uint32Array> array = static_cast<Uint32Array*>(constructArrayBufferView<Uint32Array, unsigned int>(exec).get()); + if (!array.get()) + // Exception has already been thrown. + return JSValue::encode(JSValue()); + return JSValue::encode(asObject(toJS(exec, jsConstructor->globalObject(), array.get()))); +} + } // namespace WebCore #endif // ENABLE(3D_CANVAS) |