blob: 7e7a59a3556a0c80e3c945ed311a3b8ee90a04ee [file] [log] [blame]
jorlow@chromium.orgc3be04c2011-03-02 01:23:44 +00001/*
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"
commit-queue@webkit.org64d3f852011-07-26 21:56:13 +000027#include "TestSerializedScriptValueInterface.h"
jorlow@chromium.orgc3be04c2011-03-02 01:23:44 +000028#include <runtime/JSGlobalObject.h>
rniwa@webkit.org344958d2011-09-08 17:41:48 +000029#include <runtime/JSObject.h>
jorlow@chromium.orgc3be04c2011-03-02 01:23:44 +000030#include <runtime/ObjectPrototype.h>
31
32namespace WebCore {
33
commit-queue@webkit.org271fab22011-05-26 06:15:19 +000034class JSTestSerializedScriptValueInterface : public JSDOMWrapper {
jorlow@chromium.orgc3be04c2011-03-02 01:23:44 +000035public:
commit-queue@webkit.org6c25c522011-08-09 20:46:17 +000036 typedef JSDOMWrapper Base;
commit-queue@webkit.org64d3f852011-07-26 21:56:13 +000037 static JSTestSerializedScriptValueInterface* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr<TestSerializedScriptValueInterface> impl)
38 {
ggaren@apple.com9a9a4b52013-04-18 19:32:17 +000039 JSTestSerializedScriptValueInterface* ptr = new (NotNull, JSC::allocateCell<JSTestSerializedScriptValueInterface>(globalObject->vm().heap)) JSTestSerializedScriptValueInterface(structure, globalObject, impl);
40 ptr->finishCreation(globalObject->vm());
mhahnenberg@apple.com5e109722011-09-14 18:55:25 +000041 return ptr;
commit-queue@webkit.org64d3f852011-07-26 21:56:13 +000042 }
43
timothy@apple.com97f14362013-09-26 21:45:22 +000044 static JSC::JSObject* createPrototype(JSC::VM&, JSC::JSGlobalObject*);
mark.lam@apple.comfc274cb2013-08-01 21:13:11 +000045 static bool getOwnPropertySlot(JSC::JSObject*, JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&);
haraken@chromium.org895abdd2012-01-03 15:46:42 +000046 static void destroy(JSC::JSCell*);
haraken@chromium.org313f2462012-02-13 02:12:57 +000047 ~JSTestSerializedScriptValueInterface();
fpizlo@apple.com10ae2d02013-08-14 02:41:47 +000048 DECLARE_INFO;
jorlow@chromium.orgc3be04c2011-03-02 01:23:44 +000049
ggaren@apple.com9a9a4b52013-04-18 19:32:17 +000050 static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
jorlow@chromium.orgc3be04c2011-03-02 01:23:44 +000051 {
fpizlo@apple.com10ae2d02013-08-14 02:41:47 +000052 return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
jorlow@chromium.orgc3be04c2011-03-02 01:23:44 +000053 }
54
timothy@apple.com97f14362013-09-26 21:45:22 +000055 static JSC::JSValue getConstructor(JSC::VM&, JSC::JSGlobalObject*);
haraken@chromium.orgf476e542012-02-03 00:47:44 +000056 JSC::WriteBarrier<JSC::Unknown> m_cachedValue;
57 JSC::WriteBarrier<JSC::Unknown> m_cachedReadonlyValue;
58 static void visitChildren(JSCell*, JSC::SlotVisitor&);
59
akling@apple.com51269d92013-10-10 12:01:51 +000060 TestSerializedScriptValueInterface& impl() const { return *m_impl; }
haraken@chromium.orgc059ae92011-11-17 03:13:47 +000061 void releaseImpl() { m_impl->deref(); m_impl = 0; }
jorlow@chromium.orgc3be04c2011-03-02 01:23:44 +000062
ch.dumez@sisa.samsung.com01be9142013-05-11 19:07:55 +000063 void releaseImplIfNotNull()
64 {
65 if (m_impl) {
66 m_impl->deref();
67 m_impl = 0;
68 }
69 }
haraken@chromium.org895abdd2012-01-03 15:46:42 +000070
jorlow@chromium.orgc3be04c2011-03-02 01:23:44 +000071private:
haraken@chromium.orgc059ae92011-11-17 03:13:47 +000072 TestSerializedScriptValueInterface* m_impl;
jorlow@chromium.orgc3be04c2011-03-02 01:23:44 +000073protected:
commit-queue@webkit.org64d3f852011-07-26 21:56:13 +000074 JSTestSerializedScriptValueInterface(JSC::Structure*, JSDOMGlobalObject*, PassRefPtr<TestSerializedScriptValueInterface>);
ggaren@apple.com9a9a4b52013-04-18 19:32:17 +000075 void finishCreation(JSC::VM&);
berto@igalia.comb6f83682014-01-18 23:31:06 +000076 static const unsigned StructureFlags = JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::OverridesGetOwnPropertySlot | JSC::OverridesVisitChildren | Base::StructureFlags;
jorlow@chromium.orgc3be04c2011-03-02 01:23:44 +000077};
78
mhahnenberg@apple.com72a567c2011-11-16 05:10:42 +000079class JSTestSerializedScriptValueInterfaceOwner : public JSC::WeakHandleOwner {
abarth@webkit.orgad2669e2012-11-18 21:55:52 +000080public:
mhahnenberg@apple.com72a567c2011-11-16 05:10:42 +000081 virtual bool isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown>, void* context, JSC::SlotVisitor&);
82 virtual void finalize(JSC::Handle<JSC::Unknown>, void* context);
83};
84
andersca@apple.comcb5c2d62013-10-02 18:23:56 +000085inline JSC::WeakHandleOwner* wrapperOwner(DOMWrapperWorld&, TestSerializedScriptValueInterface*)
mhahnenberg@apple.com72a567c2011-11-16 05:10:42 +000086{
87 DEFINE_STATIC_LOCAL(JSTestSerializedScriptValueInterfaceOwner, jsTestSerializedScriptValueInterfaceOwner, ());
88 return &jsTestSerializedScriptValueInterfaceOwner;
89}
90
andersca@apple.comcb5c2d62013-10-02 18:23:56 +000091inline void* wrapperContext(DOMWrapperWorld& world, TestSerializedScriptValueInterface*)
mhahnenberg@apple.com72a567c2011-11-16 05:10:42 +000092{
andersca@apple.comcb5c2d62013-10-02 18:23:56 +000093 return &world;
mhahnenberg@apple.com72a567c2011-11-16 05:10:42 +000094}
95
jorlow@chromium.orgc3be04c2011-03-02 01:23:44 +000096JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestSerializedScriptValueInterface*);
97TestSerializedScriptValueInterface* toTestSerializedScriptValueInterface(JSC::JSValue);
98
rniwa@webkit.org344958d2011-09-08 17:41:48 +000099class JSTestSerializedScriptValueInterfacePrototype : public JSC::JSNonFinalObject {
jorlow@chromium.orgc3be04c2011-03-02 01:23:44 +0000100public:
rniwa@webkit.org344958d2011-09-08 17:41:48 +0000101 typedef JSC::JSNonFinalObject Base;
timothy@apple.com97f14362013-09-26 21:45:22 +0000102 static JSC::JSObject* self(JSC::VM&, JSC::JSGlobalObject*);
ggaren@apple.com9a9a4b52013-04-18 19:32:17 +0000103 static JSTestSerializedScriptValueInterfacePrototype* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
commit-queue@webkit.org64d3f852011-07-26 21:56:13 +0000104 {
ggaren@apple.com9a9a4b52013-04-18 19:32:17 +0000105 JSTestSerializedScriptValueInterfacePrototype* ptr = new (NotNull, JSC::allocateCell<JSTestSerializedScriptValueInterfacePrototype>(vm.heap)) JSTestSerializedScriptValueInterfacePrototype(vm, globalObject, structure);
106 ptr->finishCreation(vm);
mhahnenberg@apple.com5e109722011-09-14 18:55:25 +0000107 return ptr;
commit-queue@webkit.org64d3f852011-07-26 21:56:13 +0000108 }
109
fpizlo@apple.com10ae2d02013-08-14 02:41:47 +0000110 DECLARE_INFO;
ggaren@apple.com9a9a4b52013-04-18 19:32:17 +0000111 static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
jorlow@chromium.orgc3be04c2011-03-02 01:23:44 +0000112 {
fpizlo@apple.com10ae2d02013-08-14 02:41:47 +0000113 return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
jorlow@chromium.orgc3be04c2011-03-02 01:23:44 +0000114 }
commit-queue@webkit.org64d3f852011-07-26 21:56:13 +0000115
116private:
ggaren@apple.com9a9a4b52013-04-18 19:32:17 +0000117 JSTestSerializedScriptValueInterfacePrototype(JSC::VM& vm, JSC::JSGlobalObject*, JSC::Structure* structure) : JSC::JSNonFinalObject(vm, structure) { }
jorlow@chromium.orgc3be04c2011-03-02 01:23:44 +0000118protected:
ch.dumez@sisa.samsung.com8f462752013-05-08 10:59:50 +0000119 static const unsigned StructureFlags = JSC::OverridesVisitChildren | Base::StructureFlags;
jorlow@chromium.orgc3be04c2011-03-02 01:23:44 +0000120};
121
haraken@chromium.orgbe1aca02011-10-16 23:30:06 +0000122class JSTestSerializedScriptValueInterfaceConstructor : public DOMConstructorObject {
123private:
124 JSTestSerializedScriptValueInterfaceConstructor(JSC::Structure*, JSDOMGlobalObject*);
timothy@apple.com97f14362013-09-26 21:45:22 +0000125 void finishCreation(JSC::VM&, JSDOMGlobalObject*);
haraken@chromium.orgbe1aca02011-10-16 23:30:06 +0000126
127public:
128 typedef DOMConstructorObject Base;
timothy@apple.com97f14362013-09-26 21:45:22 +0000129 static JSTestSerializedScriptValueInterfaceConstructor* create(JSC::VM& vm, JSC::Structure* structure, JSDOMGlobalObject* globalObject)
haraken@chromium.orgbe1aca02011-10-16 23:30:06 +0000130 {
timothy@apple.com97f14362013-09-26 21:45:22 +0000131 JSTestSerializedScriptValueInterfaceConstructor* ptr = new (NotNull, JSC::allocateCell<JSTestSerializedScriptValueInterfaceConstructor>(vm.heap)) JSTestSerializedScriptValueInterfaceConstructor(structure, globalObject);
132 ptr->finishCreation(vm, globalObject);
haraken@chromium.orgbe1aca02011-10-16 23:30:06 +0000133 return ptr;
134 }
135
mark.lam@apple.comfc274cb2013-08-01 21:13:11 +0000136 static bool getOwnPropertySlot(JSC::JSObject*, JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&);
fpizlo@apple.com10ae2d02013-08-14 02:41:47 +0000137 DECLARE_INFO;
ggaren@apple.com9a9a4b52013-04-18 19:32:17 +0000138 static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
haraken@chromium.orgbe1aca02011-10-16 23:30:06 +0000139 {
fpizlo@apple.com10ae2d02013-08-14 02:41:47 +0000140 return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
haraken@chromium.orgbe1aca02011-10-16 23:30:06 +0000141 }
142protected:
143 static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | JSC::ImplementsHasInstance | DOMConstructorObject::StructureFlags;
144};
145
jorlow@chromium.orgc3be04c2011-03-02 01:23:44 +0000146// Attributes
147
oliver@apple.comae0687b2013-12-06 03:03:24 +0000148JSC::EncodedJSValue jsTestSerializedScriptValueInterfaceValue(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);
oliver@apple.com2b5f3732014-01-25 01:26:49 +0000149void setJSTestSerializedScriptValueInterfaceValue(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
oliver@apple.comae0687b2013-12-06 03:03:24 +0000150JSC::EncodedJSValue jsTestSerializedScriptValueInterfaceReadonlyValue(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);
151JSC::EncodedJSValue jsTestSerializedScriptValueInterfaceCachedValue(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);
oliver@apple.com2b5f3732014-01-25 01:26:49 +0000152void setJSTestSerializedScriptValueInterfaceCachedValue(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
oliver@apple.comae0687b2013-12-06 03:03:24 +0000153JSC::EncodedJSValue jsTestSerializedScriptValueInterfacePorts(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);
154JSC::EncodedJSValue jsTestSerializedScriptValueInterfaceCachedReadonlyValue(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);
155JSC::EncodedJSValue jsTestSerializedScriptValueInterfaceConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);
jorlow@chromium.orgc3be04c2011-03-02 01:23:44 +0000156
157} // namespace WebCore
158
159#endif // ENABLE(Condition1) || ENABLE(Condition2)
160
161#endif