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#ifndef JSTestSerializedScriptValueInterface_h 22#define JSTestSerializedScriptValueInterface_h 23 24#if ENABLE(Condition1) || ENABLE(Condition2) 25 26#include "JSDOMBinding.h" 27#include "TestSerializedScriptValueInterface.h" 28#include <runtime/JSGlobalObject.h> 29#include <runtime/JSObject.h> 30#include <runtime/ObjectPrototype.h> 31 32namespace WebCore { 33 34class JSTestSerializedScriptValueInterface : public JSDOMWrapper { 35public: 36 typedef JSDOMWrapper Base; 37 static JSTestSerializedScriptValueInterface* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr<TestSerializedScriptValueInterface> impl) 38 { 39 JSTestSerializedScriptValueInterface* ptr = new (NotNull, JSC::allocateCell<JSTestSerializedScriptValueInterface>(globalObject->vm().heap)) JSTestSerializedScriptValueInterface(structure, globalObject, impl); 40 ptr->finishCreation(globalObject->vm()); 41 return ptr; 42 } 43 44 static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); 45 static bool getOwnPropertySlot(JSC::JSCell*, JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&); 46 static bool getOwnPropertyDescriptor(JSC::JSObject*, JSC::ExecState*, JSC::PropertyName, JSC::PropertyDescriptor&); 47 static void put(JSC::JSCell*, JSC::ExecState*, JSC::PropertyName, JSC::JSValue, JSC::PutPropertySlot&); 48 static void destroy(JSC::JSCell*); 49 ~JSTestSerializedScriptValueInterface(); 50 static const JSC::ClassInfo s_info; 51 52 static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype) 53 { 54 return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), &s_info); 55 } 56 57 static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); 58 JSC::WriteBarrier<JSC::Unknown> m_cachedValue; 59 JSC::WriteBarrier<JSC::Unknown> m_cachedReadonlyValue; 60 static void visitChildren(JSCell*, JSC::SlotVisitor&); 61 62 TestSerializedScriptValueInterface* impl() const { return m_impl; } 63 void releaseImpl() { m_impl->deref(); m_impl = 0; } 64 65 void releaseImplIfNotNull() 66 { 67 if (m_impl) { 68 m_impl->deref(); 69 m_impl = 0; 70 } 71 } 72 73private: 74 TestSerializedScriptValueInterface* m_impl; 75protected: 76 JSTestSerializedScriptValueInterface(JSC::Structure*, JSDOMGlobalObject*, PassRefPtr<TestSerializedScriptValueInterface>); 77 void finishCreation(JSC::VM&); 78 static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::OverridesVisitChildren | Base::StructureFlags; 79}; 80 81class JSTestSerializedScriptValueInterfaceOwner : public JSC::WeakHandleOwner { 82public: 83 virtual bool isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown>, void* context, JSC::SlotVisitor&); 84 virtual void finalize(JSC::Handle<JSC::Unknown>, void* context); 85}; 86 87inline JSC::WeakHandleOwner* wrapperOwner(DOMWrapperWorld*, TestSerializedScriptValueInterface*) 88{ 89 DEFINE_STATIC_LOCAL(JSTestSerializedScriptValueInterfaceOwner, jsTestSerializedScriptValueInterfaceOwner, ()); 90 return &jsTestSerializedScriptValueInterfaceOwner; 91} 92 93inline void* wrapperContext(DOMWrapperWorld* world, TestSerializedScriptValueInterface*) 94{ 95 return world; 96} 97 98JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestSerializedScriptValueInterface*); 99TestSerializedScriptValueInterface* toTestSerializedScriptValueInterface(JSC::JSValue); 100 101class JSTestSerializedScriptValueInterfacePrototype : public JSC::JSNonFinalObject { 102public: 103 typedef JSC::JSNonFinalObject Base; 104 static JSC::JSObject* self(JSC::ExecState*, JSC::JSGlobalObject*); 105 static JSTestSerializedScriptValueInterfacePrototype* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure) 106 { 107 JSTestSerializedScriptValueInterfacePrototype* ptr = new (NotNull, JSC::allocateCell<JSTestSerializedScriptValueInterfacePrototype>(vm.heap)) JSTestSerializedScriptValueInterfacePrototype(vm, globalObject, structure); 108 ptr->finishCreation(vm); 109 return ptr; 110 } 111 112 static const JSC::ClassInfo s_info; 113 static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype) 114 { 115 return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), &s_info); 116 } 117 118private: 119 JSTestSerializedScriptValueInterfacePrototype(JSC::VM& vm, JSC::JSGlobalObject*, JSC::Structure* structure) : JSC::JSNonFinalObject(vm, structure) { } 120protected: 121 static const unsigned StructureFlags = JSC::OverridesVisitChildren | Base::StructureFlags; 122}; 123 124class JSTestSerializedScriptValueInterfaceConstructor : public DOMConstructorObject { 125private: 126 JSTestSerializedScriptValueInterfaceConstructor(JSC::Structure*, JSDOMGlobalObject*); 127 void finishCreation(JSC::ExecState*, JSDOMGlobalObject*); 128 129public: 130 typedef DOMConstructorObject Base; 131 static JSTestSerializedScriptValueInterfaceConstructor* create(JSC::ExecState* exec, JSC::Structure* structure, JSDOMGlobalObject* globalObject) 132 { 133 JSTestSerializedScriptValueInterfaceConstructor* ptr = new (NotNull, JSC::allocateCell<JSTestSerializedScriptValueInterfaceConstructor>(*exec->heap())) JSTestSerializedScriptValueInterfaceConstructor(structure, globalObject); 134 ptr->finishCreation(exec, globalObject); 135 return ptr; 136 } 137 138 static bool getOwnPropertySlot(JSC::JSCell*, JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&); 139 static bool getOwnPropertyDescriptor(JSC::JSObject*, JSC::ExecState*, JSC::PropertyName, JSC::PropertyDescriptor&); 140 static const JSC::ClassInfo s_info; 141 static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype) 142 { 143 return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), &s_info); 144 } 145protected: 146 static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | JSC::ImplementsHasInstance | DOMConstructorObject::StructureFlags; 147}; 148 149// Attributes 150 151JSC::JSValue jsTestSerializedScriptValueInterfaceValue(JSC::ExecState*, JSC::JSValue, JSC::PropertyName); 152void setJSTestSerializedScriptValueInterfaceValue(JSC::ExecState*, JSC::JSObject*, JSC::JSValue); 153JSC::JSValue jsTestSerializedScriptValueInterfaceReadonlyValue(JSC::ExecState*, JSC::JSValue, JSC::PropertyName); 154JSC::JSValue jsTestSerializedScriptValueInterfaceCachedValue(JSC::ExecState*, JSC::JSValue, JSC::PropertyName); 155void setJSTestSerializedScriptValueInterfaceCachedValue(JSC::ExecState*, JSC::JSObject*, JSC::JSValue); 156JSC::JSValue jsTestSerializedScriptValueInterfacePorts(JSC::ExecState*, JSC::JSValue, JSC::PropertyName); 157JSC::JSValue jsTestSerializedScriptValueInterfaceCachedReadonlyValue(JSC::ExecState*, JSC::JSValue, JSC::PropertyName); 158JSC::JSValue jsTestSerializedScriptValueInterfaceConstructor(JSC::ExecState*, JSC::JSValue, JSC::PropertyName); 159 160} // namespace WebCore 161 162#endif // ENABLE(Condition1) || ENABLE(Condition2) 163 164#endif 165