summaryrefslogtreecommitdiffstats
path: root/WebCore/bindings/v8/custom/V8WebGLShortArrayCustom.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/bindings/v8/custom/V8WebGLShortArrayCustom.cpp')
-rw-r--r--WebCore/bindings/v8/custom/V8WebGLShortArrayCustom.cpp34
1 files changed, 3 insertions, 31 deletions
diff --git a/WebCore/bindings/v8/custom/V8WebGLShortArrayCustom.cpp b/WebCore/bindings/v8/custom/V8WebGLShortArrayCustom.cpp
index f8a26c3..9d3b478 100644
--- a/WebCore/bindings/v8/custom/V8WebGLShortArrayCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8WebGLShortArrayCustom.cpp
@@ -44,48 +44,20 @@
namespace WebCore {
-CALLBACK_FUNC_DECL(WebGLShortArrayConstructor)
+v8::Handle<v8::Value> V8WebGLShortArray::constructorCallback(const v8::Arguments& args)
{
INC_STATS("DOM.WebGLShortArray.Contructor");
return constructWebGLArray<WebGLShortArray>(args, V8ClassIndex::ToInt(V8ClassIndex::WEBGLSHORTARRAY));
}
-// Get the specified value from the array and return it wrapped as a JavaScript Number object to V8. Accesses outside the valid array range return "undefined".
-INDEXED_PROPERTY_GETTER(WebGLShortArray)
-{
- INC_STATS("DOM.WebGLShortArray.IndexedPropertyGetter");
- WebGLShortArray* array = V8DOMWrapper::convertToNativeObject<WebGLShortArray>(V8ClassIndex::WEBGLSHORTARRAY, info.Holder());
-
- if ((index < 0) || (index >= array->length()))
- return v8::Undefined();
- short result;
- if (!array->get(index, result))
- return v8::Undefined();
- return v8::Number::New(result);
-}
-
-// Set the specified value in the array. Accesses outside the valid array range are silently ignored.
-INDEXED_PROPERTY_SETTER(WebGLShortArray)
-{
- INC_STATS("DOM.WebGLShortArray.IndexedPropertySetter");
- WebGLShortArray* array = V8DOMWrapper::convertToNativeObject<WebGLShortArray>(V8ClassIndex::WEBGLSHORTARRAY, info.Holder());
-
- if ((index >= 0) && (index < array->length())) {
- if (!value->IsNumber())
- return throwError("Could not convert value argument to a number");
- array->set(index, value->NumberValue());
- }
- return value;
-}
-
-CALLBACK_FUNC_DECL(WebGLShortArrayGet)
+v8::Handle<v8::Value> V8WebGLShortArray::getCallback(const v8::Arguments& args)
{
INC_STATS("DOM.WebGLShortArray.get()");
return getWebGLArrayElement<WebGLShortArray, short>(args, V8ClassIndex::WEBGLSHORTARRAY);
}
-CALLBACK_FUNC_DECL(WebGLShortArraySet)
+v8::Handle<v8::Value> V8WebGLShortArray::setCallback(const v8::Arguments& args)
{
INC_STATS("DOM.WebGLShortArray.set()");
return setWebGLArray<WebGLShortArray, V8WebGLShortArray>(args, V8ClassIndex::WEBGLSHORTARRAY);