Ejemplo n.º 1
0
JSValue jsInt32ArrayLength(ExecState* exec, JSValue slotBase, const Identifier&)
{
    JSInt32Array* castedThis = static_cast<JSInt32Array*>(asObject(slotBase));
    UNUSED_PARAM(exec);
    Int32Array* imp = static_cast<Int32Array*>(castedThis->impl());
    JSValue result = jsNumber(imp->length());
    return result;
}
Ejemplo n.º 2
0
static v8::Handle<v8::Value> lengthAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
    INC_STATS("DOM.Int32Array.length._get");
    Int32Array* imp = V8Int32Array::toNative(info.Holder());
    return v8::Integer::NewFromUnsigned(imp->length());
}