diff -r 000000000000 -r 4f2f89ce4247 WebCore/generated/JSFileError.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/WebCore/generated/JSFileError.cpp Fri Sep 17 09:02:29 2010 +0300 @@ -0,0 +1,234 @@ +/* + 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" + +#if ENABLE(FILE_READER) || ENABLE(FILE_WRITER) + +#include "JSFileError.h" + +#include "FileError.h" +#include +#include + +using namespace JSC; + +namespace WebCore { + +ASSERT_CLASS_FITS_IN_CELL(JSFileError); + +/* Hash table */ +#if ENABLE(JIT) +#define THUNK_GENERATOR(generator) , generator +#else +#define THUNK_GENERATOR(generator) +#endif + +static const HashTableValue JSFileErrorTableValues[3] = +{ + { "code", DontDelete | ReadOnly, (intptr_t)static_cast(jsFileErrorCode), (intptr_t)0 THUNK_GENERATOR(0) }, + { "constructor", DontEnum | ReadOnly, (intptr_t)static_cast(jsFileErrorConstructor), (intptr_t)0 THUNK_GENERATOR(0) }, + { 0, 0, 0, 0 THUNK_GENERATOR(0) } +}; + +#undef THUNK_GENERATOR +static JSC_CONST_HASHTABLE HashTable JSFileErrorTable = { 5, 3, JSFileErrorTableValues, 0 }; +/* Hash table for constructor */ +#if ENABLE(JIT) +#define THUNK_GENERATOR(generator) , generator +#else +#define THUNK_GENERATOR(generator) +#endif + +static const HashTableValue JSFileErrorConstructorTableValues[7] = +{ + { "NO_MODIFICATION_ALLOWED_ERR", DontDelete | ReadOnly, (intptr_t)static_cast(jsFileErrorNO_MODIFICATION_ALLOWED_ERR), (intptr_t)0 THUNK_GENERATOR(0) }, + { "NOT_FOUND_ERR", DontDelete | ReadOnly, (intptr_t)static_cast(jsFileErrorNOT_FOUND_ERR), (intptr_t)0 THUNK_GENERATOR(0) }, + { "SECURITY_ERR", DontDelete | ReadOnly, (intptr_t)static_cast(jsFileErrorSECURITY_ERR), (intptr_t)0 THUNK_GENERATOR(0) }, + { "ABORT_ERR", DontDelete | ReadOnly, (intptr_t)static_cast(jsFileErrorABORT_ERR), (intptr_t)0 THUNK_GENERATOR(0) }, + { "NOT_READABLE_ERR", DontDelete | ReadOnly, (intptr_t)static_cast(jsFileErrorNOT_READABLE_ERR), (intptr_t)0 THUNK_GENERATOR(0) }, + { "ENCODING_ERR", DontDelete | ReadOnly, (intptr_t)static_cast(jsFileErrorENCODING_ERR), (intptr_t)0 THUNK_GENERATOR(0) }, + { 0, 0, 0, 0 THUNK_GENERATOR(0) } +}; + +#undef THUNK_GENERATOR +static JSC_CONST_HASHTABLE HashTable JSFileErrorConstructorTable = { 17, 15, JSFileErrorConstructorTableValues, 0 }; +class JSFileErrorConstructor : public DOMConstructorObject { +public: + JSFileErrorConstructor(JSC::ExecState*, JSDOMGlobalObject*); + + virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&); + virtual bool getOwnPropertyDescriptor(JSC::ExecState*, const JSC::Identifier&, JSC::PropertyDescriptor&); + virtual const JSC::ClassInfo* classInfo() const { return &s_info; } + static const JSC::ClassInfo s_info; + static PassRefPtr createStructure(JSC::JSValue prototype) + { + return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount); + } +protected: + static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | JSC::ImplementsHasInstance | DOMConstructorObject::StructureFlags; +}; + +const ClassInfo JSFileErrorConstructor::s_info = { "FileErrorConstructor", 0, &JSFileErrorConstructorTable, 0 }; + +JSFileErrorConstructor::JSFileErrorConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSFileErrorConstructor::createStructure(globalObject->objectPrototype()), globalObject) +{ + putDirect(exec->propertyNames().prototype, JSFileErrorPrototype::self(exec, globalObject), DontDelete | ReadOnly); +} + +bool JSFileErrorConstructor::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) +{ + return getStaticValueSlot(exec, &JSFileErrorConstructorTable, this, propertyName, slot); +} + +bool JSFileErrorConstructor::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) +{ + return getStaticValueDescriptor(exec, &JSFileErrorConstructorTable, this, propertyName, descriptor); +} + +/* Hash table for prototype */ +#if ENABLE(JIT) +#define THUNK_GENERATOR(generator) , generator +#else +#define THUNK_GENERATOR(generator) +#endif + +static const HashTableValue JSFileErrorPrototypeTableValues[7] = +{ + { "NO_MODIFICATION_ALLOWED_ERR", DontDelete | ReadOnly, (intptr_t)static_cast(jsFileErrorNO_MODIFICATION_ALLOWED_ERR), (intptr_t)0 THUNK_GENERATOR(0) }, + { "NOT_FOUND_ERR", DontDelete | ReadOnly, (intptr_t)static_cast(jsFileErrorNOT_FOUND_ERR), (intptr_t)0 THUNK_GENERATOR(0) }, + { "SECURITY_ERR", DontDelete | ReadOnly, (intptr_t)static_cast(jsFileErrorSECURITY_ERR), (intptr_t)0 THUNK_GENERATOR(0) }, + { "ABORT_ERR", DontDelete | ReadOnly, (intptr_t)static_cast(jsFileErrorABORT_ERR), (intptr_t)0 THUNK_GENERATOR(0) }, + { "NOT_READABLE_ERR", DontDelete | ReadOnly, (intptr_t)static_cast(jsFileErrorNOT_READABLE_ERR), (intptr_t)0 THUNK_GENERATOR(0) }, + { "ENCODING_ERR", DontDelete | ReadOnly, (intptr_t)static_cast(jsFileErrorENCODING_ERR), (intptr_t)0 THUNK_GENERATOR(0) }, + { 0, 0, 0, 0 THUNK_GENERATOR(0) } +}; + +#undef THUNK_GENERATOR +static JSC_CONST_HASHTABLE HashTable JSFileErrorPrototypeTable = { 17, 15, JSFileErrorPrototypeTableValues, 0 }; +const ClassInfo JSFileErrorPrototype::s_info = { "FileErrorPrototype", 0, &JSFileErrorPrototypeTable, 0 }; + +JSObject* JSFileErrorPrototype::self(ExecState* exec, JSGlobalObject* globalObject) +{ + return getDOMPrototype(exec, globalObject); +} + +bool JSFileErrorPrototype::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) +{ + return getStaticValueSlot(exec, &JSFileErrorPrototypeTable, this, propertyName, slot); +} + +bool JSFileErrorPrototype::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) +{ + return getStaticValueDescriptor(exec, &JSFileErrorPrototypeTable, this, propertyName, descriptor); +} + +const ClassInfo JSFileError::s_info = { "FileError", 0, &JSFileErrorTable, 0 }; + +JSFileError::JSFileError(NonNullPassRefPtr structure, JSDOMGlobalObject* globalObject, PassRefPtr impl) + : DOMObjectWithGlobalPointer(structure, globalObject) + , m_impl(impl) +{ +} + +JSFileError::~JSFileError() +{ + forgetDOMObject(this, impl()); +} + +JSObject* JSFileError::createPrototype(ExecState* exec, JSGlobalObject* globalObject) +{ + return new (exec) JSFileErrorPrototype(globalObject, JSFileErrorPrototype::createStructure(globalObject->objectPrototype())); +} + +bool JSFileError::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) +{ + return getStaticValueSlot(exec, &JSFileErrorTable, this, propertyName, slot); +} + +bool JSFileError::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) +{ + return getStaticValueDescriptor(exec, &JSFileErrorTable, this, propertyName, descriptor); +} + +JSValue jsFileErrorCode(ExecState* exec, JSValue slotBase, const Identifier&) +{ + JSFileError* castedThis = static_cast(asObject(slotBase)); + UNUSED_PARAM(exec); + FileError* imp = static_cast(castedThis->impl()); + JSValue result = jsNumber(exec, imp->code()); + return result; +} + +JSValue jsFileErrorConstructor(ExecState* exec, JSValue slotBase, const Identifier&) +{ + JSFileError* domObject = static_cast(asObject(slotBase)); + return JSFileError::getConstructor(exec, domObject->globalObject()); +} +JSValue JSFileError::getConstructor(ExecState* exec, JSGlobalObject* globalObject) +{ + return getDOMConstructor(exec, static_cast(globalObject)); +} + +// Constant getters + +JSValue jsFileErrorNO_MODIFICATION_ALLOWED_ERR(ExecState* exec, JSValue, const Identifier&) +{ + return jsNumber(exec, static_cast(7)); +} + +JSValue jsFileErrorNOT_FOUND_ERR(ExecState* exec, JSValue, const Identifier&) +{ + return jsNumber(exec, static_cast(8)); +} + +JSValue jsFileErrorSECURITY_ERR(ExecState* exec, JSValue, const Identifier&) +{ + return jsNumber(exec, static_cast(18)); +} + +JSValue jsFileErrorABORT_ERR(ExecState* exec, JSValue, const Identifier&) +{ + return jsNumber(exec, static_cast(20)); +} + +JSValue jsFileErrorNOT_READABLE_ERR(ExecState* exec, JSValue, const Identifier&) +{ + return jsNumber(exec, static_cast(24)); +} + +JSValue jsFileErrorENCODING_ERR(ExecState* exec, JSValue, const Identifier&) +{ + return jsNumber(exec, static_cast(26)); +} + +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, FileError* object) +{ + return getDOMObjectWrapper(exec, globalObject, object); +} +FileError* toFileError(JSC::JSValue value) +{ + return value.inherits(&JSFileError::s_info) ? static_cast(asObject(value))->impl() : 0; +} + +} + +#endif // ENABLE(FILE_READER) || ENABLE(FILE_WRITER)