jorlow@chromium.org | c3be04c | 2011-03-02 01:23:44 +0000 | [diff] [blame] | 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" |
commit-queue@webkit.org | 64d3f85 | 2011-07-26 21:56:13 +0000 | [diff] [blame] | 27 | #include "TestSerializedScriptValueInterface.h" |
jorlow@chromium.org | c3be04c | 2011-03-02 01:23:44 +0000 | [diff] [blame] | 28 | #include <runtime/JSGlobalObject.h> |
rniwa@webkit.org | 344958d | 2011-09-08 17:41:48 +0000 | [diff] [blame] | 29 | #include <runtime/JSObject.h> |
jorlow@chromium.org | c3be04c | 2011-03-02 01:23:44 +0000 | [diff] [blame] | 30 | #include <runtime/ObjectPrototype.h> |
| 31 | |
| 32 | namespace WebCore { |
| 33 | |
commit-queue@webkit.org | 271fab2 | 2011-05-26 06:15:19 +0000 | [diff] [blame] | 34 | class JSTestSerializedScriptValueInterface : public JSDOMWrapper { |
jorlow@chromium.org | c3be04c | 2011-03-02 01:23:44 +0000 | [diff] [blame] | 35 | public: |
commit-queue@webkit.org | 6c25c52 | 2011-08-09 20:46:17 +0000 | [diff] [blame] | 36 | typedef JSDOMWrapper Base; |
commit-queue@webkit.org | 64d3f85 | 2011-07-26 21:56:13 +0000 | [diff] [blame] | 37 | static JSTestSerializedScriptValueInterface* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr<TestSerializedScriptValueInterface> impl) |
| 38 | { |
ggaren@apple.com | 9a9a4b5 | 2013-04-18 19:32:17 +0000 | [diff] [blame] | 39 | JSTestSerializedScriptValueInterface* ptr = new (NotNull, JSC::allocateCell<JSTestSerializedScriptValueInterface>(globalObject->vm().heap)) JSTestSerializedScriptValueInterface(structure, globalObject, impl); |
| 40 | ptr->finishCreation(globalObject->vm()); |
mhahnenberg@apple.com | 5e10972 | 2011-09-14 18:55:25 +0000 | [diff] [blame] | 41 | return ptr; |
commit-queue@webkit.org | 64d3f85 | 2011-07-26 21:56:13 +0000 | [diff] [blame] | 42 | } |
| 43 | |
timothy@apple.com | 97f1436 | 2013-09-26 21:45:22 +0000 | [diff] [blame] | 44 | static JSC::JSObject* createPrototype(JSC::VM&, JSC::JSGlobalObject*); |
mark.lam@apple.com | fc274cb | 2013-08-01 21:13:11 +0000 | [diff] [blame] | 45 | static bool getOwnPropertySlot(JSC::JSObject*, JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&); |
haraken@chromium.org | 895abdd | 2012-01-03 15:46:42 +0000 | [diff] [blame] | 46 | static void destroy(JSC::JSCell*); |
haraken@chromium.org | 313f246 | 2012-02-13 02:12:57 +0000 | [diff] [blame] | 47 | ~JSTestSerializedScriptValueInterface(); |
fpizlo@apple.com | 10ae2d0 | 2013-08-14 02:41:47 +0000 | [diff] [blame] | 48 | DECLARE_INFO; |
jorlow@chromium.org | c3be04c | 2011-03-02 01:23:44 +0000 | [diff] [blame] | 49 | |
ggaren@apple.com | 9a9a4b5 | 2013-04-18 19:32:17 +0000 | [diff] [blame] | 50 | static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype) |
jorlow@chromium.org | c3be04c | 2011-03-02 01:23:44 +0000 | [diff] [blame] | 51 | { |
fpizlo@apple.com | 10ae2d0 | 2013-08-14 02:41:47 +0000 | [diff] [blame] | 52 | return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info()); |
jorlow@chromium.org | c3be04c | 2011-03-02 01:23:44 +0000 | [diff] [blame] | 53 | } |
| 54 | |
timothy@apple.com | 97f1436 | 2013-09-26 21:45:22 +0000 | [diff] [blame] | 55 | static JSC::JSValue getConstructor(JSC::VM&, JSC::JSGlobalObject*); |
haraken@chromium.org | f476e54 | 2012-02-03 00:47:44 +0000 | [diff] [blame] | 56 | JSC::WriteBarrier<JSC::Unknown> m_cachedValue; |
| 57 | JSC::WriteBarrier<JSC::Unknown> m_cachedReadonlyValue; |
| 58 | static void visitChildren(JSCell*, JSC::SlotVisitor&); |
| 59 | |
akling@apple.com | 51269d9 | 2013-10-10 12:01:51 +0000 | [diff] [blame] | 60 | TestSerializedScriptValueInterface& impl() const { return *m_impl; } |
haraken@chromium.org | c059ae9 | 2011-11-17 03:13:47 +0000 | [diff] [blame] | 61 | void releaseImpl() { m_impl->deref(); m_impl = 0; } |
jorlow@chromium.org | c3be04c | 2011-03-02 01:23:44 +0000 | [diff] [blame] | 62 | |
ch.dumez@sisa.samsung.com | 01be914 | 2013-05-11 19:07:55 +0000 | [diff] [blame] | 63 | void releaseImplIfNotNull() |
| 64 | { |
| 65 | if (m_impl) { |
| 66 | m_impl->deref(); |
| 67 | m_impl = 0; |
| 68 | } |
| 69 | } |
haraken@chromium.org | 895abdd | 2012-01-03 15:46:42 +0000 | [diff] [blame] | 70 | |
jorlow@chromium.org | c3be04c | 2011-03-02 01:23:44 +0000 | [diff] [blame] | 71 | private: |
haraken@chromium.org | c059ae9 | 2011-11-17 03:13:47 +0000 | [diff] [blame] | 72 | TestSerializedScriptValueInterface* m_impl; |
jorlow@chromium.org | c3be04c | 2011-03-02 01:23:44 +0000 | [diff] [blame] | 73 | protected: |
commit-queue@webkit.org | 64d3f85 | 2011-07-26 21:56:13 +0000 | [diff] [blame] | 74 | JSTestSerializedScriptValueInterface(JSC::Structure*, JSDOMGlobalObject*, PassRefPtr<TestSerializedScriptValueInterface>); |
ggaren@apple.com | 9a9a4b5 | 2013-04-18 19:32:17 +0000 | [diff] [blame] | 75 | void finishCreation(JSC::VM&); |
berto@igalia.com | b6f8368 | 2014-01-18 23:31:06 +0000 | [diff] [blame] | 76 | static const unsigned StructureFlags = JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::OverridesGetOwnPropertySlot | JSC::OverridesVisitChildren | Base::StructureFlags; |
jorlow@chromium.org | c3be04c | 2011-03-02 01:23:44 +0000 | [diff] [blame] | 77 | }; |
| 78 | |
mhahnenberg@apple.com | 72a567c | 2011-11-16 05:10:42 +0000 | [diff] [blame] | 79 | class JSTestSerializedScriptValueInterfaceOwner : public JSC::WeakHandleOwner { |
abarth@webkit.org | ad2669e | 2012-11-18 21:55:52 +0000 | [diff] [blame] | 80 | public: |
mhahnenberg@apple.com | 72a567c | 2011-11-16 05:10:42 +0000 | [diff] [blame] | 81 | 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.com | cb5c2d6 | 2013-10-02 18:23:56 +0000 | [diff] [blame] | 85 | inline JSC::WeakHandleOwner* wrapperOwner(DOMWrapperWorld&, TestSerializedScriptValueInterface*) |
mhahnenberg@apple.com | 72a567c | 2011-11-16 05:10:42 +0000 | [diff] [blame] | 86 | { |
| 87 | DEFINE_STATIC_LOCAL(JSTestSerializedScriptValueInterfaceOwner, jsTestSerializedScriptValueInterfaceOwner, ()); |
| 88 | return &jsTestSerializedScriptValueInterfaceOwner; |
| 89 | } |
| 90 | |
andersca@apple.com | cb5c2d6 | 2013-10-02 18:23:56 +0000 | [diff] [blame] | 91 | inline void* wrapperContext(DOMWrapperWorld& world, TestSerializedScriptValueInterface*) |
mhahnenberg@apple.com | 72a567c | 2011-11-16 05:10:42 +0000 | [diff] [blame] | 92 | { |
andersca@apple.com | cb5c2d6 | 2013-10-02 18:23:56 +0000 | [diff] [blame] | 93 | return &world; |
mhahnenberg@apple.com | 72a567c | 2011-11-16 05:10:42 +0000 | [diff] [blame] | 94 | } |
| 95 | |
jorlow@chromium.org | c3be04c | 2011-03-02 01:23:44 +0000 | [diff] [blame] | 96 | JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestSerializedScriptValueInterface*); |
| 97 | TestSerializedScriptValueInterface* toTestSerializedScriptValueInterface(JSC::JSValue); |
| 98 | |
rniwa@webkit.org | 344958d | 2011-09-08 17:41:48 +0000 | [diff] [blame] | 99 | class JSTestSerializedScriptValueInterfacePrototype : public JSC::JSNonFinalObject { |
jorlow@chromium.org | c3be04c | 2011-03-02 01:23:44 +0000 | [diff] [blame] | 100 | public: |
rniwa@webkit.org | 344958d | 2011-09-08 17:41:48 +0000 | [diff] [blame] | 101 | typedef JSC::JSNonFinalObject Base; |
timothy@apple.com | 97f1436 | 2013-09-26 21:45:22 +0000 | [diff] [blame] | 102 | static JSC::JSObject* self(JSC::VM&, JSC::JSGlobalObject*); |
ggaren@apple.com | 9a9a4b5 | 2013-04-18 19:32:17 +0000 | [diff] [blame] | 103 | static JSTestSerializedScriptValueInterfacePrototype* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure) |
commit-queue@webkit.org | 64d3f85 | 2011-07-26 21:56:13 +0000 | [diff] [blame] | 104 | { |
ggaren@apple.com | 9a9a4b5 | 2013-04-18 19:32:17 +0000 | [diff] [blame] | 105 | JSTestSerializedScriptValueInterfacePrototype* ptr = new (NotNull, JSC::allocateCell<JSTestSerializedScriptValueInterfacePrototype>(vm.heap)) JSTestSerializedScriptValueInterfacePrototype(vm, globalObject, structure); |
| 106 | ptr->finishCreation(vm); |
mhahnenberg@apple.com | 5e10972 | 2011-09-14 18:55:25 +0000 | [diff] [blame] | 107 | return ptr; |
commit-queue@webkit.org | 64d3f85 | 2011-07-26 21:56:13 +0000 | [diff] [blame] | 108 | } |
| 109 | |
fpizlo@apple.com | 10ae2d0 | 2013-08-14 02:41:47 +0000 | [diff] [blame] | 110 | DECLARE_INFO; |
ggaren@apple.com | 9a9a4b5 | 2013-04-18 19:32:17 +0000 | [diff] [blame] | 111 | static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype) |
jorlow@chromium.org | c3be04c | 2011-03-02 01:23:44 +0000 | [diff] [blame] | 112 | { |
fpizlo@apple.com | 10ae2d0 | 2013-08-14 02:41:47 +0000 | [diff] [blame] | 113 | return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info()); |
jorlow@chromium.org | c3be04c | 2011-03-02 01:23:44 +0000 | [diff] [blame] | 114 | } |
commit-queue@webkit.org | 64d3f85 | 2011-07-26 21:56:13 +0000 | [diff] [blame] | 115 | |
| 116 | private: |
ggaren@apple.com | 9a9a4b5 | 2013-04-18 19:32:17 +0000 | [diff] [blame] | 117 | JSTestSerializedScriptValueInterfacePrototype(JSC::VM& vm, JSC::JSGlobalObject*, JSC::Structure* structure) : JSC::JSNonFinalObject(vm, structure) { } |
jorlow@chromium.org | c3be04c | 2011-03-02 01:23:44 +0000 | [diff] [blame] | 118 | protected: |
ch.dumez@sisa.samsung.com | 8f46275 | 2013-05-08 10:59:50 +0000 | [diff] [blame] | 119 | static const unsigned StructureFlags = JSC::OverridesVisitChildren | Base::StructureFlags; |
jorlow@chromium.org | c3be04c | 2011-03-02 01:23:44 +0000 | [diff] [blame] | 120 | }; |
| 121 | |
haraken@chromium.org | be1aca0 | 2011-10-16 23:30:06 +0000 | [diff] [blame] | 122 | class JSTestSerializedScriptValueInterfaceConstructor : public DOMConstructorObject { |
| 123 | private: |
| 124 | JSTestSerializedScriptValueInterfaceConstructor(JSC::Structure*, JSDOMGlobalObject*); |
timothy@apple.com | 97f1436 | 2013-09-26 21:45:22 +0000 | [diff] [blame] | 125 | void finishCreation(JSC::VM&, JSDOMGlobalObject*); |
haraken@chromium.org | be1aca0 | 2011-10-16 23:30:06 +0000 | [diff] [blame] | 126 | |
| 127 | public: |
| 128 | typedef DOMConstructorObject Base; |
timothy@apple.com | 97f1436 | 2013-09-26 21:45:22 +0000 | [diff] [blame] | 129 | static JSTestSerializedScriptValueInterfaceConstructor* create(JSC::VM& vm, JSC::Structure* structure, JSDOMGlobalObject* globalObject) |
haraken@chromium.org | be1aca0 | 2011-10-16 23:30:06 +0000 | [diff] [blame] | 130 | { |
timothy@apple.com | 97f1436 | 2013-09-26 21:45:22 +0000 | [diff] [blame] | 131 | JSTestSerializedScriptValueInterfaceConstructor* ptr = new (NotNull, JSC::allocateCell<JSTestSerializedScriptValueInterfaceConstructor>(vm.heap)) JSTestSerializedScriptValueInterfaceConstructor(structure, globalObject); |
| 132 | ptr->finishCreation(vm, globalObject); |
haraken@chromium.org | be1aca0 | 2011-10-16 23:30:06 +0000 | [diff] [blame] | 133 | return ptr; |
| 134 | } |
| 135 | |
mark.lam@apple.com | fc274cb | 2013-08-01 21:13:11 +0000 | [diff] [blame] | 136 | static bool getOwnPropertySlot(JSC::JSObject*, JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&); |
fpizlo@apple.com | 10ae2d0 | 2013-08-14 02:41:47 +0000 | [diff] [blame] | 137 | DECLARE_INFO; |
ggaren@apple.com | 9a9a4b5 | 2013-04-18 19:32:17 +0000 | [diff] [blame] | 138 | static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype) |
haraken@chromium.org | be1aca0 | 2011-10-16 23:30:06 +0000 | [diff] [blame] | 139 | { |
fpizlo@apple.com | 10ae2d0 | 2013-08-14 02:41:47 +0000 | [diff] [blame] | 140 | return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info()); |
haraken@chromium.org | be1aca0 | 2011-10-16 23:30:06 +0000 | [diff] [blame] | 141 | } |
| 142 | protected: |
| 143 | static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | JSC::ImplementsHasInstance | DOMConstructorObject::StructureFlags; |
| 144 | }; |
| 145 | |
jorlow@chromium.org | c3be04c | 2011-03-02 01:23:44 +0000 | [diff] [blame] | 146 | // Attributes |
| 147 | |
oliver@apple.com | ae0687b | 2013-12-06 03:03:24 +0000 | [diff] [blame] | 148 | JSC::EncodedJSValue jsTestSerializedScriptValueInterfaceValue(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName); |
oliver@apple.com | 2b5f373 | 2014-01-25 01:26:49 +0000 | [diff] [blame^] | 149 | void setJSTestSerializedScriptValueInterfaceValue(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
oliver@apple.com | ae0687b | 2013-12-06 03:03:24 +0000 | [diff] [blame] | 150 | JSC::EncodedJSValue jsTestSerializedScriptValueInterfaceReadonlyValue(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName); |
| 151 | JSC::EncodedJSValue jsTestSerializedScriptValueInterfaceCachedValue(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName); |
oliver@apple.com | 2b5f373 | 2014-01-25 01:26:49 +0000 | [diff] [blame^] | 152 | void setJSTestSerializedScriptValueInterfaceCachedValue(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
oliver@apple.com | ae0687b | 2013-12-06 03:03:24 +0000 | [diff] [blame] | 153 | JSC::EncodedJSValue jsTestSerializedScriptValueInterfacePorts(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName); |
| 154 | JSC::EncodedJSValue jsTestSerializedScriptValueInterfaceCachedReadonlyValue(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName); |
| 155 | JSC::EncodedJSValue jsTestSerializedScriptValueInterfaceConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName); |
jorlow@chromium.org | c3be04c | 2011-03-02 01:23:44 +0000 | [diff] [blame] | 156 | |
| 157 | } // namespace WebCore |
| 158 | |
| 159 | #endif // ENABLE(Condition1) || ENABLE(Condition2) |
| 160 | |
| 161 | #endif |