~oif-team/ubuntu/natty/qt4-x11/xi2.1

« back to all changes in this revision

Viewing changes to src/3rdparty/webkit/WebCore/generated/JSSQLResultSetRowList.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Alessandro Ghersi
  • Date: 2009-11-02 18:30:08 UTC
  • mfrom: (1.2.2 upstream)
  • mto: (15.2.5 experimental)
  • mto: This revision was merged to the branch mainline in revision 88.
  • Revision ID: james.westby@ubuntu.com-20091102183008-b6a4gcs128mvfb3m
Tags: upstream-4.6.0~beta1
ImportĀ upstreamĀ versionĀ 4.6.0~beta1

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
 
21
21
#include "config.h"
22
22
 
 
23
#if ENABLE(DATABASE)
 
24
 
23
25
#include "JSSQLResultSetRowList.h"
24
26
 
25
 
#include <wtf/GetPtr.h>
26
 
 
27
27
#include "SQLResultSetRowList.h"
28
 
 
29
28
#include <runtime/Error.h>
30
29
#include <runtime/JSNumberCell.h>
 
30
#include <wtf/GetPtr.h>
31
31
 
32
32
using namespace JSC;
33
33
 
34
34
namespace WebCore {
35
35
 
36
 
ASSERT_CLASS_FITS_IN_CELL(JSSQLResultSetRowList)
 
36
ASSERT_CLASS_FITS_IN_CELL(JSSQLResultSetRowList);
37
37
 
38
38
/* Hash table */
39
39
 
43
43
    { 0, 0, 0, 0 }
44
44
};
45
45
 
46
 
static const HashTable JSSQLResultSetRowListTable =
 
46
static JSC_CONST_HASHTABLE HashTable JSSQLResultSetRowListTable =
47
47
#if ENABLE(PERFECT_HASH_SIZE)
48
48
    { 0, JSSQLResultSetRowListTableValues, 0 };
49
49
#else
58
58
    { 0, 0, 0, 0 }
59
59
};
60
60
 
61
 
static const HashTable JSSQLResultSetRowListPrototypeTable =
 
61
static JSC_CONST_HASHTABLE HashTable JSSQLResultSetRowListPrototypeTable =
62
62
#if ENABLE(PERFECT_HASH_SIZE)
63
63
    { 0, JSSQLResultSetRowListPrototypeTableValues, 0 };
64
64
#else
77
77
    return getStaticFunctionSlot<JSObject>(exec, &JSSQLResultSetRowListPrototypeTable, this, propertyName, slot);
78
78
}
79
79
 
 
80
bool JSSQLResultSetRowListPrototype::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
 
81
{
 
82
    return getStaticFunctionDescriptor<JSObject>(exec, &JSSQLResultSetRowListPrototypeTable, this, propertyName, descriptor);
 
83
}
 
84
 
80
85
const ClassInfo JSSQLResultSetRowList::s_info = { "SQLResultSetRowList", 0, &JSSQLResultSetRowListTable, 0 };
81
86
 
82
 
JSSQLResultSetRowList::JSSQLResultSetRowList(PassRefPtr<Structure> structure, PassRefPtr<SQLResultSetRowList> impl)
83
 
    : DOMObject(structure)
 
87
JSSQLResultSetRowList::JSSQLResultSetRowList(NonNullPassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SQLResultSetRowList> impl)
 
88
    : DOMObjectWithGlobalPointer(structure, globalObject)
84
89
    , m_impl(impl)
85
90
{
86
91
}
87
92
 
88
93
JSSQLResultSetRowList::~JSSQLResultSetRowList()
89
94
{
90
 
    forgetDOMObject(*Heap::heap(this)->globalData(), m_impl.get());
91
 
 
 
95
    forgetDOMObject(*Heap::heap(this)->globalData(), impl());
92
96
}
93
97
 
94
98
JSObject* JSSQLResultSetRowList::createPrototype(ExecState* exec, JSGlobalObject* globalObject)
101
105
    return getStaticValueSlot<JSSQLResultSetRowList, Base>(exec, &JSSQLResultSetRowListTable, this, propertyName, slot);
102
106
}
103
107
 
104
 
JSValuePtr jsSQLResultSetRowListLength(ExecState* exec, const Identifier&, const PropertySlot& slot)
105
 
{
106
 
    SQLResultSetRowList* imp = static_cast<SQLResultSetRowList*>(static_cast<JSSQLResultSetRowList*>(asObject(slot.slotBase()))->impl());
 
108
bool JSSQLResultSetRowList::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
 
109
{
 
110
    return getStaticValueDescriptor<JSSQLResultSetRowList, Base>(exec, &JSSQLResultSetRowListTable, this, propertyName, descriptor);
 
111
}
 
112
 
 
113
JSValue jsSQLResultSetRowListLength(ExecState* exec, const Identifier&, const PropertySlot& slot)
 
114
{
 
115
    JSSQLResultSetRowList* castedThis = static_cast<JSSQLResultSetRowList*>(asObject(slot.slotBase()));
 
116
    UNUSED_PARAM(exec);
 
117
    SQLResultSetRowList* imp = static_cast<SQLResultSetRowList*>(castedThis->impl());
107
118
    return jsNumber(exec, imp->length());
108
119
}
109
120
 
110
 
JSValuePtr jsSQLResultSetRowListPrototypeFunctionItem(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList& args)
 
121
JSValue JSC_HOST_CALL jsSQLResultSetRowListPrototypeFunctionItem(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
111
122
{
112
 
    if (!thisValue->isObject(&JSSQLResultSetRowList::s_info))
 
123
    UNUSED_PARAM(args);
 
124
    if (!thisValue.inherits(&JSSQLResultSetRowList::s_info))
113
125
        return throwError(exec, TypeError);
114
126
    JSSQLResultSetRowList* castedThisObj = static_cast<JSSQLResultSetRowList*>(asObject(thisValue));
115
127
    return castedThisObj->item(exec, args);
116
128
}
117
129
 
118
 
JSC::JSValuePtr toJS(JSC::ExecState* exec, SQLResultSetRowList* object)
119
 
{
120
 
    return getDOMObjectWrapper<JSSQLResultSetRowList>(exec, object);
121
 
}
122
 
SQLResultSetRowList* toSQLResultSetRowList(JSC::JSValuePtr value)
123
 
{
124
 
    return value->isObject(&JSSQLResultSetRowList::s_info) ? static_cast<JSSQLResultSetRowList*>(asObject(value))->impl() : 0;
125
 
}
126
 
 
127
 
}
 
130
JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, SQLResultSetRowList* object)
 
131
{
 
132
    return getDOMObjectWrapper<JSSQLResultSetRowList>(exec, globalObject, object);
 
133
}
 
134
SQLResultSetRowList* toSQLResultSetRowList(JSC::JSValue value)
 
135
{
 
136
    return value.inherits(&JSSQLResultSetRowList::s_info) ? static_cast<JSSQLResultSetRowList*>(asObject(value))->impl() : 0;
 
137
}
 
138
 
 
139
}
 
140
 
 
141
#endif // ENABLE(DATABASE)