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 "JSDOMWrapper.h"
27#include "TestSerializedScriptValueInterface.h"
28
29namespace WebCore {
30
31class JSTestSerializedScriptValueInterface : public JSDOMWrapper {
32public:
33    typedef JSDOMWrapper Base;
34    static JSTestSerializedScriptValueInterface* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr<TestSerializedScriptValueInterface> impl)
35    {
36        JSTestSerializedScriptValueInterface* ptr = new (NotNull, JSC::allocateCell<JSTestSerializedScriptValueInterface>(globalObject->vm().heap)) JSTestSerializedScriptValueInterface(structure, globalObject, impl);
37        ptr->finishCreation(globalObject->vm());
38        return ptr;
39    }
40
41    static JSC::JSObject* createPrototype(JSC::VM&, JSC::JSGlobalObject*);
42    static JSC::JSObject* getPrototype(JSC::VM&, JSC::JSGlobalObject*);
43    static void destroy(JSC::JSCell*);
44    ~JSTestSerializedScriptValueInterface();
45
46    DECLARE_INFO;
47
48    static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
49    {
50        return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
51    }
52
53    static JSC::JSValue getConstructor(JSC::VM&, JSC::JSGlobalObject*);
54    JSC::WriteBarrier<JSC::Unknown> m_cachedValue;
55    JSC::WriteBarrier<JSC::Unknown> m_cachedReadonlyValue;
56    static void visitChildren(JSCell*, JSC::SlotVisitor&);
57
58    TestSerializedScriptValueInterface& impl() const { return *m_impl; }
59    void releaseImpl() { m_impl->deref(); m_impl = 0; }
60
61    void releaseImplIfNotNull()
62    {
63        if (m_impl) {
64            m_impl->deref();
65            m_impl = 0;
66        }
67    }
68
69private:
70    TestSerializedScriptValueInterface* m_impl;
71protected:
72    JSTestSerializedScriptValueInterface(JSC::Structure*, JSDOMGlobalObject*, PassRefPtr<TestSerializedScriptValueInterface>);
73
74    void finishCreation(JSC::VM& vm)
75    {
76        Base::finishCreation(vm);
77        ASSERT(inherits(info()));
78    }
79
80    static const unsigned StructureFlags = JSC::OverridesVisitChildren | Base::StructureFlags;
81};
82
83class JSTestSerializedScriptValueInterfaceOwner : public JSC::WeakHandleOwner {
84public:
85    virtual bool isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown>, void* context, JSC::SlotVisitor&);
86    virtual void finalize(JSC::Handle<JSC::Unknown>, void* context);
87};
88
89inline JSC::WeakHandleOwner* wrapperOwner(DOMWrapperWorld&, TestSerializedScriptValueInterface*)
90{
91    DEPRECATED_DEFINE_STATIC_LOCAL(JSTestSerializedScriptValueInterfaceOwner, jsTestSerializedScriptValueInterfaceOwner, ());
92    return &jsTestSerializedScriptValueInterfaceOwner;
93}
94
95inline void* wrapperContext(DOMWrapperWorld& world, TestSerializedScriptValueInterface*)
96{
97    return &world;
98}
99
100JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestSerializedScriptValueInterface*);
101TestSerializedScriptValueInterface* toTestSerializedScriptValueInterface(JSC::JSValue);
102
103
104} // namespace WebCore
105
106#endif // ENABLE(Condition1) || ENABLE(Condition2)
107
108#endif
109