2 This file is part of the WebKit open source project.
3 This file has been generated by generate-bindings.pl. DO NOT MODIFY!
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.
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.
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.
24 #include "JSDOMBinding.h"
26 #include <runtime/JSGlobalObject.h>
27 #include <runtime/JSObject.h>
28 #include <runtime/ObjectPrototype.h>
32 class JSreadonly : public JSDOMWrapper {
34 typedef JSDOMWrapper Base;
35 static JSreadonly* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr<readonly> impl)
37 JSreadonly* ptr = new (NotNull, JSC::allocateCell<JSreadonly>(globalObject->vm().heap)) JSreadonly(structure, globalObject, impl);
38 ptr->finishCreation(globalObject->vm());
42 static JSC::JSObject* createPrototype(JSC::VM&, JSC::JSGlobalObject*);
43 static bool getOwnPropertySlot(JSC::JSObject*, JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&);
44 static void destroy(JSC::JSCell*);
48 static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
50 return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
53 static JSC::JSValue getConstructor(JSC::VM&, JSC::JSGlobalObject*);
54 readonly* impl() const { return m_impl; }
55 void releaseImpl() { m_impl->deref(); m_impl = 0; }
57 void releaseImplIfNotNull()
68 JSreadonly(JSC::Structure*, JSDOMGlobalObject*, PassRefPtr<readonly>);
69 void finishCreation(JSC::VM&);
70 static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | Base::StructureFlags;
73 class JSreadonlyOwner : public JSC::WeakHandleOwner {
75 virtual bool isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown>, void* context, JSC::SlotVisitor&);
76 virtual void finalize(JSC::Handle<JSC::Unknown>, void* context);
79 inline JSC::WeakHandleOwner* wrapperOwner(DOMWrapperWorld&, readonly*)
81 DEFINE_STATIC_LOCAL(JSreadonlyOwner, jsreadonlyOwner, ());
82 return &jsreadonlyOwner;
85 inline void* wrapperContext(DOMWrapperWorld& world, readonly*)
90 JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, readonly*);
91 readonly* toreadonly(JSC::JSValue);
93 class JSreadonlyPrototype : public JSC::JSNonFinalObject {
95 typedef JSC::JSNonFinalObject Base;
96 static JSC::JSObject* self(JSC::VM&, JSC::JSGlobalObject*);
97 static JSreadonlyPrototype* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
99 JSreadonlyPrototype* ptr = new (NotNull, JSC::allocateCell<JSreadonlyPrototype>(vm.heap)) JSreadonlyPrototype(vm, globalObject, structure);
100 ptr->finishCreation(vm);
105 static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
107 return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
111 JSreadonlyPrototype(JSC::VM& vm, JSC::JSGlobalObject*, JSC::Structure* structure) : JSC::JSNonFinalObject(vm, structure) { }
113 static const unsigned StructureFlags = Base::StructureFlags;
116 class JSreadonlyConstructor : public DOMConstructorObject {
118 JSreadonlyConstructor(JSC::Structure*, JSDOMGlobalObject*);
119 void finishCreation(JSC::VM&, JSDOMGlobalObject*);
122 typedef DOMConstructorObject Base;
123 static JSreadonlyConstructor* create(JSC::VM& vm, JSC::Structure* structure, JSDOMGlobalObject* globalObject)
125 JSreadonlyConstructor* ptr = new (NotNull, JSC::allocateCell<JSreadonlyConstructor>(vm.heap)) JSreadonlyConstructor(structure, globalObject);
126 ptr->finishCreation(vm, globalObject);
130 static bool getOwnPropertySlot(JSC::JSObject*, JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&);
132 static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
134 return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
137 static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | JSC::ImplementsHasInstance | DOMConstructorObject::StructureFlags;
142 JSC::JSValue jsreadonlyConstructor(JSC::ExecState*, JSC::JSValue, JSC::PropertyName);
144 } // namespace WebCore