blob: 28f24b69cd9ca3987df9f234da081e22b123f333 [file] [log] [blame]
/*
This file is part of the WebKit open source project.
This file has been generated by generate-bindings.pl. DO NOT MODIFY!
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#include "config.h"
#include "JSTestNode.h"
#include "ExceptionCode.h"
#include "JSDOMBinding.h"
#include "TestNode.h"
#include <runtime/Error.h>
#include <wtf/GetPtr.h>
using namespace JSC;
namespace WebCore {
/* Hash table */
static const HashTableValue JSTestNodeTableValues[] =
{
{ "constructor", DontEnum | ReadOnly, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestNodeConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) },
{ 0, 0, NoIntrinsic, 0, 0 }
};
static const HashTable JSTestNodeTable = { 2, 1, true, JSTestNodeTableValues, 0 };
/* Hash table for constructor */
static const HashTableValue JSTestNodeConstructorTableValues[] =
{
{ 0, 0, NoIntrinsic, 0, 0 }
};
static const HashTable JSTestNodeConstructorTable = { 1, 0, false, JSTestNodeConstructorTableValues, 0 };
EncodedJSValue JSC_HOST_CALL JSTestNodeConstructor::constructJSTestNode(ExecState* exec)
{
JSTestNodeConstructor* castedThis = jsCast<JSTestNodeConstructor*>(exec->callee());
RefPtr<TestNode> object = TestNode::create();
return JSValue::encode(asObject(toJS(exec, castedThis->globalObject(), object.get())));
}
const ClassInfo JSTestNodeConstructor::s_info = { "TestNodeConstructor", &Base::s_info, &JSTestNodeConstructorTable, 0, CREATE_METHOD_TABLE(JSTestNodeConstructor) };
JSTestNodeConstructor::JSTestNodeConstructor(Structure* structure, JSDOMGlobalObject* globalObject)
: DOMConstructorObject(structure, globalObject)
{
}
void JSTestNodeConstructor::finishCreation(VM& vm, JSDOMGlobalObject* globalObject)
{
Base::finishCreation(vm);
ASSERT(inherits(info()));
putDirect(vm, vm.propertyNames->prototype, JSTestNodePrototype::self(vm, globalObject), DontDelete | ReadOnly);
putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontDelete | DontEnum);
}
bool JSTestNodeConstructor::getOwnPropertySlot(JSObject* object, ExecState* exec, PropertyName propertyName, PropertySlot& slot)
{
return getStaticValueSlot<JSTestNodeConstructor, JSDOMWrapper>(exec, JSTestNodeConstructorTable, jsCast<JSTestNodeConstructor*>(object), propertyName, slot);
}
ConstructType JSTestNodeConstructor::getConstructData(JSCell*, ConstructData& constructData)
{
constructData.native.function = constructJSTestNode;
return ConstructTypeHost;
}
/* Hash table for prototype */
static const HashTableValue JSTestNodePrototypeTableValues[] =
{
{ 0, 0, NoIntrinsic, 0, 0 }
};
static const HashTable JSTestNodePrototypeTable = { 1, 0, false, JSTestNodePrototypeTableValues, 0 };
const ClassInfo JSTestNodePrototype::s_info = { "TestNodePrototype", &Base::s_info, &JSTestNodePrototypeTable, 0, CREATE_METHOD_TABLE(JSTestNodePrototype) };
JSObject* JSTestNodePrototype::self(VM& vm, JSGlobalObject* globalObject)
{
return getDOMPrototype<JSTestNode>(vm, globalObject);
}
const ClassInfo JSTestNode::s_info = { "TestNode", &Base::s_info, &JSTestNodeTable, 0 , CREATE_METHOD_TABLE(JSTestNode) };
JSTestNode::JSTestNode(Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr<TestNode> impl)
: JSNode(structure, globalObject, impl)
{
}
void JSTestNode::finishCreation(VM& vm)
{
Base::finishCreation(vm);
ASSERT(inherits(info()));
}
JSObject* JSTestNode::createPrototype(VM& vm, JSGlobalObject* globalObject)
{
return JSTestNodePrototype::create(vm, globalObject, JSTestNodePrototype::createStructure(vm, globalObject, JSNodePrototype::self(vm, globalObject)));
}
bool JSTestNode::getOwnPropertySlot(JSObject* object, ExecState* exec, PropertyName propertyName, PropertySlot& slot)
{
JSTestNode* thisObject = jsCast<JSTestNode*>(object);
ASSERT_GC_OBJECT_INHERITS(thisObject, info());
return getStaticValueSlot<JSTestNode, Base>(exec, JSTestNodeTable, thisObject, propertyName, slot);
}
EncodedJSValue jsTestNodeConstructor(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue, PropertyName)
{
JSTestNode* domObject = jsDynamicCast<JSTestNode*>(JSValue::decode(thisValue));
if (!domObject)
return throwVMTypeError(exec);
if (!domObject)
return throwVMTypeError(exec);
return JSValue::encode(JSTestNode::getConstructor(exec->vm(), domObject->globalObject()));
}
JSValue JSTestNode::getConstructor(VM& vm, JSGlobalObject* globalObject)
{
return getDOMConstructor<JSTestNodeConstructor>(vm, jsCast<JSDOMGlobalObject*>(globalObject));
}
void JSTestNode::visitChildren(JSCell* cell, SlotVisitor& visitor)
{
JSTestNode* thisObject = jsCast<JSTestNode*>(cell);
ASSERT_GC_OBJECT_INHERITS(thisObject, info());
COMPILE_ASSERT(StructureFlags & OverridesVisitChildren, OverridesVisitChildrenWithoutSettingFlag);
ASSERT(thisObject->structure()->typeInfo().overridesVisitChildren());
Base::visitChildren(thisObject, visitor);
thisObject->impl().visitJSEventListeners(visitor);
}
}