WebCore/generated/JSIDBIndexRequest.cpp
changeset 0 4f2f89ce4247
equal deleted inserted replaced
-1:000000000000 0:4f2f89ce4247
       
     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(INDEXED_DATABASE)
       
    24 
       
    25 #include "JSIDBIndexRequest.h"
       
    26 
       
    27 #include "IDBIndexRequest.h"
       
    28 #include "KURL.h"
       
    29 #include <runtime/JSString.h>
       
    30 #include <wtf/GetPtr.h>
       
    31 
       
    32 using namespace JSC;
       
    33 
       
    34 namespace WebCore {
       
    35 
       
    36 ASSERT_CLASS_FITS_IN_CELL(JSIDBIndexRequest);
       
    37 
       
    38 /* Hash table */
       
    39 #if ENABLE(JIT)
       
    40 #define THUNK_GENERATOR(generator) , generator
       
    41 #else
       
    42 #define THUNK_GENERATOR(generator)
       
    43 #endif
       
    44 
       
    45 static const HashTableValue JSIDBIndexRequestTableValues[5] =
       
    46 {
       
    47     { "name", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsIDBIndexRequestName), (intptr_t)0 THUNK_GENERATOR(0) },
       
    48     { "keyPath", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsIDBIndexRequestKeyPath), (intptr_t)0 THUNK_GENERATOR(0) },
       
    49     { "unique", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsIDBIndexRequestUnique), (intptr_t)0 THUNK_GENERATOR(0) },
       
    50     { "constructor", DontEnum | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsIDBIndexRequestConstructor), (intptr_t)0 THUNK_GENERATOR(0) },
       
    51     { 0, 0, 0, 0 THUNK_GENERATOR(0) }
       
    52 };
       
    53 
       
    54 #undef THUNK_GENERATOR
       
    55 static JSC_CONST_HASHTABLE HashTable JSIDBIndexRequestTable = { 9, 7, JSIDBIndexRequestTableValues, 0 };
       
    56 /* Hash table for constructor */
       
    57 #if ENABLE(JIT)
       
    58 #define THUNK_GENERATOR(generator) , generator
       
    59 #else
       
    60 #define THUNK_GENERATOR(generator)
       
    61 #endif
       
    62 
       
    63 static const HashTableValue JSIDBIndexRequestConstructorTableValues[1] =
       
    64 {
       
    65     { 0, 0, 0, 0 THUNK_GENERATOR(0) }
       
    66 };
       
    67 
       
    68 #undef THUNK_GENERATOR
       
    69 static JSC_CONST_HASHTABLE HashTable JSIDBIndexRequestConstructorTable = { 1, 0, JSIDBIndexRequestConstructorTableValues, 0 };
       
    70 class JSIDBIndexRequestConstructor : public DOMConstructorObject {
       
    71 public:
       
    72     JSIDBIndexRequestConstructor(JSC::ExecState*, JSDOMGlobalObject*);
       
    73 
       
    74     virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&);
       
    75     virtual bool getOwnPropertyDescriptor(JSC::ExecState*, const JSC::Identifier&, JSC::PropertyDescriptor&);
       
    76     virtual const JSC::ClassInfo* classInfo() const { return &s_info; }
       
    77     static const JSC::ClassInfo s_info;
       
    78     static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype)
       
    79     {
       
    80         return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount);
       
    81     }
       
    82 protected:
       
    83     static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | JSC::ImplementsHasInstance | DOMConstructorObject::StructureFlags;
       
    84 };
       
    85 
       
    86 const ClassInfo JSIDBIndexRequestConstructor::s_info = { "IDBIndexRequestConstructor", 0, &JSIDBIndexRequestConstructorTable, 0 };
       
    87 
       
    88 JSIDBIndexRequestConstructor::JSIDBIndexRequestConstructor(ExecState* exec, JSDOMGlobalObject* globalObject)
       
    89     : DOMConstructorObject(JSIDBIndexRequestConstructor::createStructure(globalObject->objectPrototype()), globalObject)
       
    90 {
       
    91     putDirect(exec->propertyNames().prototype, JSIDBIndexRequestPrototype::self(exec, globalObject), DontDelete | ReadOnly);
       
    92 }
       
    93 
       
    94 bool JSIDBIndexRequestConstructor::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
       
    95 {
       
    96     return getStaticValueSlot<JSIDBIndexRequestConstructor, DOMObject>(exec, &JSIDBIndexRequestConstructorTable, this, propertyName, slot);
       
    97 }
       
    98 
       
    99 bool JSIDBIndexRequestConstructor::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
       
   100 {
       
   101     return getStaticValueDescriptor<JSIDBIndexRequestConstructor, DOMObject>(exec, &JSIDBIndexRequestConstructorTable, this, propertyName, descriptor);
       
   102 }
       
   103 
       
   104 /* Hash table for prototype */
       
   105 #if ENABLE(JIT)
       
   106 #define THUNK_GENERATOR(generator) , generator
       
   107 #else
       
   108 #define THUNK_GENERATOR(generator)
       
   109 #endif
       
   110 
       
   111 static const HashTableValue JSIDBIndexRequestPrototypeTableValues[1] =
       
   112 {
       
   113     { 0, 0, 0, 0 THUNK_GENERATOR(0) }
       
   114 };
       
   115 
       
   116 #undef THUNK_GENERATOR
       
   117 static JSC_CONST_HASHTABLE HashTable JSIDBIndexRequestPrototypeTable = { 1, 0, JSIDBIndexRequestPrototypeTableValues, 0 };
       
   118 const ClassInfo JSIDBIndexRequestPrototype::s_info = { "IDBIndexRequestPrototype", 0, &JSIDBIndexRequestPrototypeTable, 0 };
       
   119 
       
   120 JSObject* JSIDBIndexRequestPrototype::self(ExecState* exec, JSGlobalObject* globalObject)
       
   121 {
       
   122     return getDOMPrototype<JSIDBIndexRequest>(exec, globalObject);
       
   123 }
       
   124 
       
   125 const ClassInfo JSIDBIndexRequest::s_info = { "IDBIndexRequest", 0, &JSIDBIndexRequestTable, 0 };
       
   126 
       
   127 JSIDBIndexRequest::JSIDBIndexRequest(NonNullPassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<IDBIndexRequest> impl)
       
   128     : DOMObjectWithGlobalPointer(structure, globalObject)
       
   129     , m_impl(impl)
       
   130 {
       
   131 }
       
   132 
       
   133 JSIDBIndexRequest::~JSIDBIndexRequest()
       
   134 {
       
   135     forgetDOMObject(this, impl());
       
   136 }
       
   137 
       
   138 JSObject* JSIDBIndexRequest::createPrototype(ExecState* exec, JSGlobalObject* globalObject)
       
   139 {
       
   140     return new (exec) JSIDBIndexRequestPrototype(globalObject, JSIDBIndexRequestPrototype::createStructure(globalObject->objectPrototype()));
       
   141 }
       
   142 
       
   143 bool JSIDBIndexRequest::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
       
   144 {
       
   145     return getStaticValueSlot<JSIDBIndexRequest, Base>(exec, &JSIDBIndexRequestTable, this, propertyName, slot);
       
   146 }
       
   147 
       
   148 bool JSIDBIndexRequest::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
       
   149 {
       
   150     return getStaticValueDescriptor<JSIDBIndexRequest, Base>(exec, &JSIDBIndexRequestTable, this, propertyName, descriptor);
       
   151 }
       
   152 
       
   153 JSValue jsIDBIndexRequestName(ExecState* exec, JSValue slotBase, const Identifier&)
       
   154 {
       
   155     JSIDBIndexRequest* castedThis = static_cast<JSIDBIndexRequest*>(asObject(slotBase));
       
   156     UNUSED_PARAM(exec);
       
   157     IDBIndexRequest* imp = static_cast<IDBIndexRequest*>(castedThis->impl());
       
   158     JSValue result = jsString(exec, imp->name());
       
   159     return result;
       
   160 }
       
   161 
       
   162 JSValue jsIDBIndexRequestKeyPath(ExecState* exec, JSValue slotBase, const Identifier&)
       
   163 {
       
   164     JSIDBIndexRequest* castedThis = static_cast<JSIDBIndexRequest*>(asObject(slotBase));
       
   165     UNUSED_PARAM(exec);
       
   166     IDBIndexRequest* imp = static_cast<IDBIndexRequest*>(castedThis->impl());
       
   167     JSValue result = jsString(exec, imp->keyPath());
       
   168     return result;
       
   169 }
       
   170 
       
   171 JSValue jsIDBIndexRequestUnique(ExecState* exec, JSValue slotBase, const Identifier&)
       
   172 {
       
   173     JSIDBIndexRequest* castedThis = static_cast<JSIDBIndexRequest*>(asObject(slotBase));
       
   174     UNUSED_PARAM(exec);
       
   175     IDBIndexRequest* imp = static_cast<IDBIndexRequest*>(castedThis->impl());
       
   176     JSValue result = jsBoolean(imp->unique());
       
   177     return result;
       
   178 }
       
   179 
       
   180 JSValue jsIDBIndexRequestConstructor(ExecState* exec, JSValue slotBase, const Identifier&)
       
   181 {
       
   182     JSIDBIndexRequest* domObject = static_cast<JSIDBIndexRequest*>(asObject(slotBase));
       
   183     return JSIDBIndexRequest::getConstructor(exec, domObject->globalObject());
       
   184 }
       
   185 JSValue JSIDBIndexRequest::getConstructor(ExecState* exec, JSGlobalObject* globalObject)
       
   186 {
       
   187     return getDOMConstructor<JSIDBIndexRequestConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject));
       
   188 }
       
   189 
       
   190 JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, IDBIndexRequest* object)
       
   191 {
       
   192     return getDOMObjectWrapper<JSIDBIndexRequest>(exec, globalObject, object);
       
   193 }
       
   194 IDBIndexRequest* toIDBIndexRequest(JSC::JSValue value)
       
   195 {
       
   196     return value.inherits(&JSIDBIndexRequest::s_info) ? static_cast<JSIDBIndexRequest*>(asObject(value))->impl() : 0;
       
   197 }
       
   198 
       
   199 }
       
   200 
       
   201 #endif // ENABLE(INDEXED_DATABASE)