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.
22 #include "JSTestGenerateIsReachable.h"
24 #include "TestGenerateIsReachable.h"
25 #include <wtf/GetPtr.h>
33 static const HashTableValue JSTestGenerateIsReachableTableValues[] =
35 { "constructor", DontEnum | ReadOnly, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestGenerateIsReachableConstructor), (intptr_t)0 },
36 { 0, 0, NoIntrinsic, 0, 0 }
39 static const HashTable JSTestGenerateIsReachableTable = { 2, 1, JSTestGenerateIsReachableTableValues, 0 };
40 /* Hash table for constructor */
42 static const HashTableValue JSTestGenerateIsReachableConstructorTableValues[] =
44 { 0, 0, NoIntrinsic, 0, 0 }
47 static const HashTable JSTestGenerateIsReachableConstructorTable = { 1, 0, JSTestGenerateIsReachableConstructorTableValues, 0 };
48 const ClassInfo JSTestGenerateIsReachableConstructor::s_info = { "TestGenerateIsReachableConstructor", &Base::s_info, &JSTestGenerateIsReachableConstructorTable, 0, CREATE_METHOD_TABLE(JSTestGenerateIsReachableConstructor) };
50 JSTestGenerateIsReachableConstructor::JSTestGenerateIsReachableConstructor(Structure* structure, JSDOMGlobalObject* globalObject)
51 : DOMConstructorObject(structure, globalObject)
55 void JSTestGenerateIsReachableConstructor::finishCreation(VM& vm, JSDOMGlobalObject* globalObject)
57 Base::finishCreation(vm);
58 ASSERT(inherits(info()));
59 putDirect(vm, vm.propertyNames->prototype, JSTestGenerateIsReachablePrototype::self(vm, globalObject), DontDelete | ReadOnly);
60 putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontDelete | DontEnum);
63 bool JSTestGenerateIsReachableConstructor::getOwnPropertySlot(JSObject* object, ExecState* exec, PropertyName propertyName, PropertySlot& slot)
65 return getStaticValueSlot<JSTestGenerateIsReachableConstructor, JSDOMWrapper>(exec, JSTestGenerateIsReachableConstructorTable, jsCast<JSTestGenerateIsReachableConstructor*>(object), propertyName, slot);
68 /* Hash table for prototype */
70 static const HashTableValue JSTestGenerateIsReachablePrototypeTableValues[] =
72 { 0, 0, NoIntrinsic, 0, 0 }
75 static const HashTable JSTestGenerateIsReachablePrototypeTable = { 1, 0, JSTestGenerateIsReachablePrototypeTableValues, 0 };
76 const ClassInfo JSTestGenerateIsReachablePrototype::s_info = { "TestGenerateIsReachablePrototype", &Base::s_info, &JSTestGenerateIsReachablePrototypeTable, 0, CREATE_METHOD_TABLE(JSTestGenerateIsReachablePrototype) };
78 JSObject* JSTestGenerateIsReachablePrototype::self(VM& vm, JSGlobalObject* globalObject)
80 return getDOMPrototype<JSTestGenerateIsReachable>(vm, globalObject);
83 const ClassInfo JSTestGenerateIsReachable::s_info = { "TestGenerateIsReachable", &Base::s_info, &JSTestGenerateIsReachableTable, 0 , CREATE_METHOD_TABLE(JSTestGenerateIsReachable) };
85 JSTestGenerateIsReachable::JSTestGenerateIsReachable(Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr<TestGenerateIsReachable> impl)
86 : JSDOMWrapper(structure, globalObject)
87 , m_impl(impl.leakRef())
91 void JSTestGenerateIsReachable::finishCreation(VM& vm)
93 Base::finishCreation(vm);
94 ASSERT(inherits(info()));
97 JSObject* JSTestGenerateIsReachable::createPrototype(VM& vm, JSGlobalObject* globalObject)
99 return JSTestGenerateIsReachablePrototype::create(vm, globalObject, JSTestGenerateIsReachablePrototype::createStructure(vm, globalObject, globalObject->objectPrototype()));
102 void JSTestGenerateIsReachable::destroy(JSC::JSCell* cell)
104 JSTestGenerateIsReachable* thisObject = static_cast<JSTestGenerateIsReachable*>(cell);
105 thisObject->JSTestGenerateIsReachable::~JSTestGenerateIsReachable();
108 JSTestGenerateIsReachable::~JSTestGenerateIsReachable()
110 releaseImplIfNotNull();
113 bool JSTestGenerateIsReachable::getOwnPropertySlot(JSObject* object, ExecState* exec, PropertyName propertyName, PropertySlot& slot)
115 JSTestGenerateIsReachable* thisObject = jsCast<JSTestGenerateIsReachable*>(object);
116 ASSERT_GC_OBJECT_INHERITS(thisObject, info());
117 return getStaticValueSlot<JSTestGenerateIsReachable, Base>(exec, JSTestGenerateIsReachableTable, thisObject, propertyName, slot);
120 EncodedJSValue jsTestGenerateIsReachableConstructor(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
122 JSTestGenerateIsReachable* domObject = jsDynamicCast<JSTestGenerateIsReachable*>(JSValue::decode(slotBase));
123 return JSValue::encode(JSTestGenerateIsReachable::getConstructor(exec->vm(), domObject->globalObject()));
126 JSValue JSTestGenerateIsReachable::getConstructor(VM& vm, JSGlobalObject* globalObject)
128 return getDOMConstructor<JSTestGenerateIsReachableConstructor>(vm, jsCast<JSDOMGlobalObject*>(globalObject));
131 static inline bool isObservable(JSTestGenerateIsReachable* jsTestGenerateIsReachable)
133 if (jsTestGenerateIsReachable->hasCustomProperties())
138 bool JSTestGenerateIsReachableOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> handle, void*, SlotVisitor& visitor)
140 JSTestGenerateIsReachable* jsTestGenerateIsReachable = jsCast<JSTestGenerateIsReachable*>(handle.get().asCell());
141 if (!isObservable(jsTestGenerateIsReachable))
143 TestGenerateIsReachable* root = &jsTestGenerateIsReachable->impl();
144 return visitor.containsOpaqueRoot(root);
147 void JSTestGenerateIsReachableOwner::finalize(JSC::Handle<JSC::Unknown> handle, void* context)
149 JSTestGenerateIsReachable* jsTestGenerateIsReachable = jsCast<JSTestGenerateIsReachable*>(handle.get().asCell());
150 DOMWrapperWorld& world = *static_cast<DOMWrapperWorld*>(context);
151 uncacheWrapper(world, &jsTestGenerateIsReachable->impl(), jsTestGenerateIsReachable);
152 jsTestGenerateIsReachable->releaseImpl();
155 #if ENABLE(BINDING_INTEGRITY)
157 #pragma warning(disable: 4483)
158 extern "C" { extern void (*const __identifier("??_7TestGenerateIsReachable@WebCore@@6B@")[])(); }
160 extern "C" { extern void* _ZTVN7WebCore23TestGenerateIsReachableE[]; }
163 JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, TestGenerateIsReachable* impl)
167 if (JSValue result = getExistingWrapper<JSTestGenerateIsReachable>(exec, impl))
170 #if ENABLE(BINDING_INTEGRITY)
171 void* actualVTablePointer = *(reinterpret_cast<void**>(impl));
173 void* expectedVTablePointer = reinterpret_cast<void*>(__identifier("??_7TestGenerateIsReachable@WebCore@@6B@"));
175 void* expectedVTablePointer = &_ZTVN7WebCore23TestGenerateIsReachableE[2];
177 // If this fails TestGenerateIsReachable does not have a vtable, so you need to add the
178 // ImplementationLacksVTable attribute to the interface definition
179 COMPILE_ASSERT(__is_polymorphic(TestGenerateIsReachable), TestGenerateIsReachable_is_not_polymorphic);
182 // If you hit this assertion you either have a use after free bug, or
183 // TestGenerateIsReachable has subclasses. If TestGenerateIsReachable has subclasses that get passed
184 // to toJS() we currently require TestGenerateIsReachable you to opt out of binding hardening
185 // by adding the SkipVTableValidation attribute to the interface IDL definition
186 RELEASE_ASSERT(actualVTablePointer == expectedVTablePointer);
188 ReportMemoryCost<TestGenerateIsReachable>::reportMemoryCost(exec, impl);
189 return createNewWrapper<JSTestGenerateIsReachable>(exec, globalObject, impl);
192 TestGenerateIsReachable* toTestGenerateIsReachable(JSC::JSValue value)
194 return value.inherits(JSTestGenerateIsReachable::info()) ? &jsCast<JSTestGenerateIsReachable*>(value)->impl() : 0;