|
1 /* |
|
2 This file is part of the WebKit open source project. |
|
3 This file has been generated by generate-bindings.pl. DO NOT MODIFY! |
|
4 |
|
5 This library is free software; you can redistribute it and/or |
|
6 modify it under the terms of the GNU Library General Public |
|
7 License as published by the Free Software Foundation; either |
|
8 version 2 of the License, or (at your option) any later version. |
|
9 |
|
10 This library is distributed in the hope that it will be useful, |
|
11 but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|
13 Library General Public License for more details. |
|
14 |
|
15 You should have received a copy of the GNU Library General Public License |
|
16 along with this library; see the file COPYING.LIB. If not, write to |
|
17 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
|
18 Boston, MA 02110-1301, USA. |
|
19 */ |
|
20 |
|
21 #include "config.h" |
|
22 |
|
23 #if ENABLE(DATABASE) |
|
24 |
|
25 #include "JSSQLTransactionSync.h" |
|
26 |
|
27 #include "SQLResultSet.h" |
|
28 #include "SQLTransactionSync.h" |
|
29 #include <runtime/Error.h> |
|
30 #include <wtf/GetPtr.h> |
|
31 |
|
32 using namespace JSC; |
|
33 |
|
34 namespace WebCore { |
|
35 |
|
36 ASSERT_CLASS_FITS_IN_CELL(JSSQLTransactionSync); |
|
37 |
|
38 /* Hash table for prototype */ |
|
39 #if ENABLE(JIT) |
|
40 #define THUNK_GENERATOR(generator) , generator |
|
41 #else |
|
42 #define THUNK_GENERATOR(generator) |
|
43 #endif |
|
44 |
|
45 static const HashTableValue JSSQLTransactionSyncPrototypeTableValues[2] = |
|
46 { |
|
47 { "executeSql", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsSQLTransactionSyncPrototypeFunctionExecuteSql), (intptr_t)2 THUNK_GENERATOR(0) }, |
|
48 { 0, 0, 0, 0 THUNK_GENERATOR(0) } |
|
49 }; |
|
50 |
|
51 #undef THUNK_GENERATOR |
|
52 static JSC_CONST_HASHTABLE HashTable JSSQLTransactionSyncPrototypeTable = { 2, 1, JSSQLTransactionSyncPrototypeTableValues, 0 }; |
|
53 static const HashTable* getJSSQLTransactionSyncPrototypeTable(ExecState* exec) |
|
54 { |
|
55 return getHashTableForGlobalData(exec->globalData(), &JSSQLTransactionSyncPrototypeTable); |
|
56 } |
|
57 const ClassInfo JSSQLTransactionSyncPrototype::s_info = { "SQLTransactionSyncPrototype", 0, 0, getJSSQLTransactionSyncPrototypeTable }; |
|
58 |
|
59 JSObject* JSSQLTransactionSyncPrototype::self(ExecState* exec, JSGlobalObject* globalObject) |
|
60 { |
|
61 return getDOMPrototype<JSSQLTransactionSync>(exec, globalObject); |
|
62 } |
|
63 |
|
64 bool JSSQLTransactionSyncPrototype::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) |
|
65 { |
|
66 return getStaticFunctionSlot<JSObject>(exec, getJSSQLTransactionSyncPrototypeTable(exec), this, propertyName, slot); |
|
67 } |
|
68 |
|
69 bool JSSQLTransactionSyncPrototype::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) |
|
70 { |
|
71 return getStaticFunctionDescriptor<JSObject>(exec, getJSSQLTransactionSyncPrototypeTable(exec), this, propertyName, descriptor); |
|
72 } |
|
73 |
|
74 const ClassInfo JSSQLTransactionSync::s_info = { "SQLTransactionSync", 0, 0, 0 }; |
|
75 |
|
76 JSSQLTransactionSync::JSSQLTransactionSync(NonNullPassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SQLTransactionSync> impl) |
|
77 : DOMObjectWithGlobalPointer(structure, globalObject) |
|
78 , m_impl(impl) |
|
79 { |
|
80 } |
|
81 |
|
82 JSSQLTransactionSync::~JSSQLTransactionSync() |
|
83 { |
|
84 forgetDOMObject(this, impl()); |
|
85 } |
|
86 |
|
87 JSObject* JSSQLTransactionSync::createPrototype(ExecState* exec, JSGlobalObject* globalObject) |
|
88 { |
|
89 return new (exec) JSSQLTransactionSyncPrototype(globalObject, JSSQLTransactionSyncPrototype::createStructure(globalObject->objectPrototype())); |
|
90 } |
|
91 |
|
92 EncodedJSValue JSC_HOST_CALL jsSQLTransactionSyncPrototypeFunctionExecuteSql(ExecState* exec) |
|
93 { |
|
94 JSValue thisValue = exec->hostThisValue(); |
|
95 if (!thisValue.inherits(&JSSQLTransactionSync::s_info)) |
|
96 return throwVMTypeError(exec); |
|
97 JSSQLTransactionSync* castedThis = static_cast<JSSQLTransactionSync*>(asObject(thisValue)); |
|
98 return JSValue::encode(castedThis->executeSql(exec)); |
|
99 } |
|
100 |
|
101 JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, SQLTransactionSync* object) |
|
102 { |
|
103 return getDOMObjectWrapper<JSSQLTransactionSync>(exec, globalObject, object); |
|
104 } |
|
105 SQLTransactionSync* toSQLTransactionSync(JSC::JSValue value) |
|
106 { |
|
107 return value.inherits(&JSSQLTransactionSync::s_info) ? static_cast<JSSQLTransactionSync*>(asObject(value))->impl() : 0; |
|
108 } |
|
109 |
|
110 } |
|
111 |
|
112 #endif // ENABLE(DATABASE) |