WebCore/generated/JSDOMCoreException.cpp
changeset 0 4f2f89ce4247
equal deleted inserted replaced
-1:000000000000 0:4f2f89ce4247
       
     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 #include "config.h"
       
    22 #include "JSDOMCoreException.h"
       
    23 
       
    24 #include "DOMCoreException.h"
       
    25 #include "KURL.h"
       
    26 #include <runtime/Error.h>
       
    27 #include <runtime/JSNumberCell.h>
       
    28 #include <runtime/JSString.h>
       
    29 #include <wtf/GetPtr.h>
       
    30 
       
    31 using namespace JSC;
       
    32 
       
    33 namespace WebCore {
       
    34 
       
    35 ASSERT_CLASS_FITS_IN_CELL(JSDOMCoreException);
       
    36 
       
    37 /* Hash table */
       
    38 #if ENABLE(JIT)
       
    39 #define THUNK_GENERATOR(generator) , generator
       
    40 #else
       
    41 #define THUNK_GENERATOR(generator)
       
    42 #endif
       
    43 
       
    44 static const HashTableValue JSDOMCoreExceptionTableValues[5] =
       
    45 {
       
    46     { "code", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMCoreExceptionCode), (intptr_t)0 THUNK_GENERATOR(0) },
       
    47     { "name", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMCoreExceptionName), (intptr_t)0 THUNK_GENERATOR(0) },
       
    48     { "message", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMCoreExceptionMessage), (intptr_t)0 THUNK_GENERATOR(0) },
       
    49     { "constructor", DontEnum | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMCoreExceptionConstructor), (intptr_t)0 THUNK_GENERATOR(0) },
       
    50     { 0, 0, 0, 0 THUNK_GENERATOR(0) }
       
    51 };
       
    52 
       
    53 #undef THUNK_GENERATOR
       
    54 static JSC_CONST_HASHTABLE HashTable JSDOMCoreExceptionTable = { 10, 7, JSDOMCoreExceptionTableValues, 0 };
       
    55 /* Hash table for constructor */
       
    56 #if ENABLE(JIT)
       
    57 #define THUNK_GENERATOR(generator) , generator
       
    58 #else
       
    59 #define THUNK_GENERATOR(generator)
       
    60 #endif
       
    61 
       
    62 static const HashTableValue JSDOMCoreExceptionConstructorTableValues[23] =
       
    63 {
       
    64     { "INDEX_SIZE_ERR", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMCoreExceptionINDEX_SIZE_ERR), (intptr_t)0 THUNK_GENERATOR(0) },
       
    65     { "DOMSTRING_SIZE_ERR", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMCoreExceptionDOMSTRING_SIZE_ERR), (intptr_t)0 THUNK_GENERATOR(0) },
       
    66     { "HIERARCHY_REQUEST_ERR", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMCoreExceptionHIERARCHY_REQUEST_ERR), (intptr_t)0 THUNK_GENERATOR(0) },
       
    67     { "WRONG_DOCUMENT_ERR", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMCoreExceptionWRONG_DOCUMENT_ERR), (intptr_t)0 THUNK_GENERATOR(0) },
       
    68     { "INVALID_CHARACTER_ERR", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMCoreExceptionINVALID_CHARACTER_ERR), (intptr_t)0 THUNK_GENERATOR(0) },
       
    69     { "NO_DATA_ALLOWED_ERR", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMCoreExceptionNO_DATA_ALLOWED_ERR), (intptr_t)0 THUNK_GENERATOR(0) },
       
    70     { "NO_MODIFICATION_ALLOWED_ERR", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMCoreExceptionNO_MODIFICATION_ALLOWED_ERR), (intptr_t)0 THUNK_GENERATOR(0) },
       
    71     { "NOT_FOUND_ERR", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMCoreExceptionNOT_FOUND_ERR), (intptr_t)0 THUNK_GENERATOR(0) },
       
    72     { "NOT_SUPPORTED_ERR", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMCoreExceptionNOT_SUPPORTED_ERR), (intptr_t)0 THUNK_GENERATOR(0) },
       
    73     { "INUSE_ATTRIBUTE_ERR", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMCoreExceptionINUSE_ATTRIBUTE_ERR), (intptr_t)0 THUNK_GENERATOR(0) },
       
    74     { "INVALID_STATE_ERR", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMCoreExceptionINVALID_STATE_ERR), (intptr_t)0 THUNK_GENERATOR(0) },
       
    75     { "SYNTAX_ERR", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMCoreExceptionSYNTAX_ERR), (intptr_t)0 THUNK_GENERATOR(0) },
       
    76     { "INVALID_MODIFICATION_ERR", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMCoreExceptionINVALID_MODIFICATION_ERR), (intptr_t)0 THUNK_GENERATOR(0) },
       
    77     { "NAMESPACE_ERR", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMCoreExceptionNAMESPACE_ERR), (intptr_t)0 THUNK_GENERATOR(0) },
       
    78     { "INVALID_ACCESS_ERR", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMCoreExceptionINVALID_ACCESS_ERR), (intptr_t)0 THUNK_GENERATOR(0) },
       
    79     { "VALIDATION_ERR", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMCoreExceptionVALIDATION_ERR), (intptr_t)0 THUNK_GENERATOR(0) },
       
    80     { "TYPE_MISMATCH_ERR", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMCoreExceptionTYPE_MISMATCH_ERR), (intptr_t)0 THUNK_GENERATOR(0) },
       
    81     { "SECURITY_ERR", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMCoreExceptionSECURITY_ERR), (intptr_t)0 THUNK_GENERATOR(0) },
       
    82     { "NETWORK_ERR", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMCoreExceptionNETWORK_ERR), (intptr_t)0 THUNK_GENERATOR(0) },
       
    83     { "ABORT_ERR", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMCoreExceptionABORT_ERR), (intptr_t)0 THUNK_GENERATOR(0) },
       
    84     { "URL_MISMATCH_ERR", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMCoreExceptionURL_MISMATCH_ERR), (intptr_t)0 THUNK_GENERATOR(0) },
       
    85     { "QUOTA_EXCEEDED_ERR", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMCoreExceptionQUOTA_EXCEEDED_ERR), (intptr_t)0 THUNK_GENERATOR(0) },
       
    86     { 0, 0, 0, 0 THUNK_GENERATOR(0) }
       
    87 };
       
    88 
       
    89 #undef THUNK_GENERATOR
       
    90 static JSC_CONST_HASHTABLE HashTable JSDOMCoreExceptionConstructorTable = { 67, 63, JSDOMCoreExceptionConstructorTableValues, 0 };
       
    91 class JSDOMCoreExceptionConstructor : public DOMConstructorObject {
       
    92 public:
       
    93     JSDOMCoreExceptionConstructor(JSC::ExecState*, JSDOMGlobalObject*);
       
    94 
       
    95     virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&);
       
    96     virtual bool getOwnPropertyDescriptor(JSC::ExecState*, const JSC::Identifier&, JSC::PropertyDescriptor&);
       
    97     virtual const JSC::ClassInfo* classInfo() const { return &s_info; }
       
    98     static const JSC::ClassInfo s_info;
       
    99     static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype)
       
   100     {
       
   101         return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount);
       
   102     }
       
   103 protected:
       
   104     static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | JSC::ImplementsHasInstance | DOMConstructorObject::StructureFlags;
       
   105 };
       
   106 
       
   107 const ClassInfo JSDOMCoreExceptionConstructor::s_info = { "DOMExceptionConstructor", 0, &JSDOMCoreExceptionConstructorTable, 0 };
       
   108 
       
   109 JSDOMCoreExceptionConstructor::JSDOMCoreExceptionConstructor(ExecState* exec, JSDOMGlobalObject* globalObject)
       
   110     : DOMConstructorObject(JSDOMCoreExceptionConstructor::createStructure(globalObject->objectPrototype()), globalObject)
       
   111 {
       
   112     putDirect(exec->propertyNames().prototype, JSDOMCoreExceptionPrototype::self(exec, globalObject), DontDelete | ReadOnly);
       
   113 }
       
   114 
       
   115 bool JSDOMCoreExceptionConstructor::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
       
   116 {
       
   117     return getStaticValueSlot<JSDOMCoreExceptionConstructor, DOMObject>(exec, &JSDOMCoreExceptionConstructorTable, this, propertyName, slot);
       
   118 }
       
   119 
       
   120 bool JSDOMCoreExceptionConstructor::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
       
   121 {
       
   122     return getStaticValueDescriptor<JSDOMCoreExceptionConstructor, DOMObject>(exec, &JSDOMCoreExceptionConstructorTable, this, propertyName, descriptor);
       
   123 }
       
   124 
       
   125 /* Hash table for prototype */
       
   126 #if ENABLE(JIT)
       
   127 #define THUNK_GENERATOR(generator) , generator
       
   128 #else
       
   129 #define THUNK_GENERATOR(generator)
       
   130 #endif
       
   131 
       
   132 static const HashTableValue JSDOMCoreExceptionPrototypeTableValues[24] =
       
   133 {
       
   134     { "INDEX_SIZE_ERR", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMCoreExceptionINDEX_SIZE_ERR), (intptr_t)0 THUNK_GENERATOR(0) },
       
   135     { "DOMSTRING_SIZE_ERR", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMCoreExceptionDOMSTRING_SIZE_ERR), (intptr_t)0 THUNK_GENERATOR(0) },
       
   136     { "HIERARCHY_REQUEST_ERR", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMCoreExceptionHIERARCHY_REQUEST_ERR), (intptr_t)0 THUNK_GENERATOR(0) },
       
   137     { "WRONG_DOCUMENT_ERR", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMCoreExceptionWRONG_DOCUMENT_ERR), (intptr_t)0 THUNK_GENERATOR(0) },
       
   138     { "INVALID_CHARACTER_ERR", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMCoreExceptionINVALID_CHARACTER_ERR), (intptr_t)0 THUNK_GENERATOR(0) },
       
   139     { "NO_DATA_ALLOWED_ERR", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMCoreExceptionNO_DATA_ALLOWED_ERR), (intptr_t)0 THUNK_GENERATOR(0) },
       
   140     { "NO_MODIFICATION_ALLOWED_ERR", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMCoreExceptionNO_MODIFICATION_ALLOWED_ERR), (intptr_t)0 THUNK_GENERATOR(0) },
       
   141     { "NOT_FOUND_ERR", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMCoreExceptionNOT_FOUND_ERR), (intptr_t)0 THUNK_GENERATOR(0) },
       
   142     { "NOT_SUPPORTED_ERR", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMCoreExceptionNOT_SUPPORTED_ERR), (intptr_t)0 THUNK_GENERATOR(0) },
       
   143     { "INUSE_ATTRIBUTE_ERR", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMCoreExceptionINUSE_ATTRIBUTE_ERR), (intptr_t)0 THUNK_GENERATOR(0) },
       
   144     { "INVALID_STATE_ERR", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMCoreExceptionINVALID_STATE_ERR), (intptr_t)0 THUNK_GENERATOR(0) },
       
   145     { "SYNTAX_ERR", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMCoreExceptionSYNTAX_ERR), (intptr_t)0 THUNK_GENERATOR(0) },
       
   146     { "INVALID_MODIFICATION_ERR", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMCoreExceptionINVALID_MODIFICATION_ERR), (intptr_t)0 THUNK_GENERATOR(0) },
       
   147     { "NAMESPACE_ERR", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMCoreExceptionNAMESPACE_ERR), (intptr_t)0 THUNK_GENERATOR(0) },
       
   148     { "INVALID_ACCESS_ERR", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMCoreExceptionINVALID_ACCESS_ERR), (intptr_t)0 THUNK_GENERATOR(0) },
       
   149     { "VALIDATION_ERR", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMCoreExceptionVALIDATION_ERR), (intptr_t)0 THUNK_GENERATOR(0) },
       
   150     { "TYPE_MISMATCH_ERR", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMCoreExceptionTYPE_MISMATCH_ERR), (intptr_t)0 THUNK_GENERATOR(0) },
       
   151     { "SECURITY_ERR", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMCoreExceptionSECURITY_ERR), (intptr_t)0 THUNK_GENERATOR(0) },
       
   152     { "NETWORK_ERR", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMCoreExceptionNETWORK_ERR), (intptr_t)0 THUNK_GENERATOR(0) },
       
   153     { "ABORT_ERR", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMCoreExceptionABORT_ERR), (intptr_t)0 THUNK_GENERATOR(0) },
       
   154     { "URL_MISMATCH_ERR", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMCoreExceptionURL_MISMATCH_ERR), (intptr_t)0 THUNK_GENERATOR(0) },
       
   155     { "QUOTA_EXCEEDED_ERR", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMCoreExceptionQUOTA_EXCEEDED_ERR), (intptr_t)0 THUNK_GENERATOR(0) },
       
   156     { "toString", DontDelete | DontEnum | Function, (intptr_t)static_cast<NativeFunction>(jsDOMCoreExceptionPrototypeFunctionToString), (intptr_t)0 THUNK_GENERATOR(0) },
       
   157     { 0, 0, 0, 0 THUNK_GENERATOR(0) }
       
   158 };
       
   159 
       
   160 #undef THUNK_GENERATOR
       
   161 static JSC_CONST_HASHTABLE HashTable JSDOMCoreExceptionPrototypeTable = { 68, 63, JSDOMCoreExceptionPrototypeTableValues, 0 };
       
   162 static const HashTable* getJSDOMCoreExceptionPrototypeTable(ExecState* exec)
       
   163 {
       
   164     return getHashTableForGlobalData(exec->globalData(), &JSDOMCoreExceptionPrototypeTable);
       
   165 }
       
   166 const ClassInfo JSDOMCoreExceptionPrototype::s_info = { "DOMExceptionPrototype", 0, 0, getJSDOMCoreExceptionPrototypeTable };
       
   167 
       
   168 JSObject* JSDOMCoreExceptionPrototype::self(ExecState* exec, JSGlobalObject* globalObject)
       
   169 {
       
   170     return getDOMPrototype<JSDOMCoreException>(exec, globalObject);
       
   171 }
       
   172 
       
   173 bool JSDOMCoreExceptionPrototype::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
       
   174 {
       
   175     return getStaticPropertySlot<JSDOMCoreExceptionPrototype, JSObject>(exec, getJSDOMCoreExceptionPrototypeTable(exec), this, propertyName, slot);
       
   176 }
       
   177 
       
   178 bool JSDOMCoreExceptionPrototype::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
       
   179 {
       
   180     return getStaticPropertyDescriptor<JSDOMCoreExceptionPrototype, JSObject>(exec, getJSDOMCoreExceptionPrototypeTable(exec), this, propertyName, descriptor);
       
   181 }
       
   182 
       
   183 static const HashTable* getJSDOMCoreExceptionTable(ExecState* exec)
       
   184 {
       
   185     return getHashTableForGlobalData(exec->globalData(), &JSDOMCoreExceptionTable);
       
   186 }
       
   187 const ClassInfo JSDOMCoreException::s_info = { "DOMException", 0, 0, getJSDOMCoreExceptionTable };
       
   188 
       
   189 JSDOMCoreException::JSDOMCoreException(NonNullPassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<DOMCoreException> impl)
       
   190     : DOMObjectWithGlobalPointer(structure, globalObject)
       
   191     , m_impl(impl)
       
   192 {
       
   193 }
       
   194 
       
   195 JSDOMCoreException::~JSDOMCoreException()
       
   196 {
       
   197     forgetDOMObject(this, impl());
       
   198 }
       
   199 
       
   200 JSObject* JSDOMCoreException::createPrototype(ExecState* exec, JSGlobalObject* globalObject)
       
   201 {
       
   202     return new (exec) JSDOMCoreExceptionPrototype(globalObject, JSDOMCoreExceptionPrototype::createStructure(globalObject->objectPrototype()));
       
   203 }
       
   204 
       
   205 bool JSDOMCoreException::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
       
   206 {
       
   207     return getStaticValueSlot<JSDOMCoreException, Base>(exec, getJSDOMCoreExceptionTable(exec), this, propertyName, slot);
       
   208 }
       
   209 
       
   210 bool JSDOMCoreException::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
       
   211 {
       
   212     return getStaticValueDescriptor<JSDOMCoreException, Base>(exec, getJSDOMCoreExceptionTable(exec), this, propertyName, descriptor);
       
   213 }
       
   214 
       
   215 JSValue jsDOMCoreExceptionCode(ExecState* exec, JSValue slotBase, const Identifier&)
       
   216 {
       
   217     JSDOMCoreException* castedThis = static_cast<JSDOMCoreException*>(asObject(slotBase));
       
   218     UNUSED_PARAM(exec);
       
   219     DOMCoreException* imp = static_cast<DOMCoreException*>(castedThis->impl());
       
   220     JSValue result = jsNumber(exec, imp->code());
       
   221     return result;
       
   222 }
       
   223 
       
   224 JSValue jsDOMCoreExceptionName(ExecState* exec, JSValue slotBase, const Identifier&)
       
   225 {
       
   226     JSDOMCoreException* castedThis = static_cast<JSDOMCoreException*>(asObject(slotBase));
       
   227     UNUSED_PARAM(exec);
       
   228     DOMCoreException* imp = static_cast<DOMCoreException*>(castedThis->impl());
       
   229     JSValue result = jsString(exec, imp->name());
       
   230     return result;
       
   231 }
       
   232 
       
   233 JSValue jsDOMCoreExceptionMessage(ExecState* exec, JSValue slotBase, const Identifier&)
       
   234 {
       
   235     JSDOMCoreException* castedThis = static_cast<JSDOMCoreException*>(asObject(slotBase));
       
   236     UNUSED_PARAM(exec);
       
   237     DOMCoreException* imp = static_cast<DOMCoreException*>(castedThis->impl());
       
   238     JSValue result = jsString(exec, imp->message());
       
   239     return result;
       
   240 }
       
   241 
       
   242 JSValue jsDOMCoreExceptionConstructor(ExecState* exec, JSValue slotBase, const Identifier&)
       
   243 {
       
   244     JSDOMCoreException* domObject = static_cast<JSDOMCoreException*>(asObject(slotBase));
       
   245     return JSDOMCoreException::getConstructor(exec, domObject->globalObject());
       
   246 }
       
   247 JSValue JSDOMCoreException::getConstructor(ExecState* exec, JSGlobalObject* globalObject)
       
   248 {
       
   249     return getDOMConstructor<JSDOMCoreExceptionConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject));
       
   250 }
       
   251 
       
   252 EncodedJSValue JSC_HOST_CALL jsDOMCoreExceptionPrototypeFunctionToString(ExecState* exec)
       
   253 {
       
   254     JSValue thisValue = exec->hostThisValue();
       
   255     if (!thisValue.inherits(&JSDOMCoreException::s_info))
       
   256         return throwVMTypeError(exec);
       
   257     JSDOMCoreException* castedThis = static_cast<JSDOMCoreException*>(asObject(thisValue));
       
   258     DOMCoreException* imp = static_cast<DOMCoreException*>(castedThis->impl());
       
   259 
       
   260 
       
   261     JSC::JSValue result = jsString(exec, imp->toString());
       
   262     return JSValue::encode(result);
       
   263 }
       
   264 
       
   265 // Constant getters
       
   266 
       
   267 JSValue jsDOMCoreExceptionINDEX_SIZE_ERR(ExecState* exec, JSValue, const Identifier&)
       
   268 {
       
   269     return jsNumber(exec, static_cast<int>(1));
       
   270 }
       
   271 
       
   272 JSValue jsDOMCoreExceptionDOMSTRING_SIZE_ERR(ExecState* exec, JSValue, const Identifier&)
       
   273 {
       
   274     return jsNumber(exec, static_cast<int>(2));
       
   275 }
       
   276 
       
   277 JSValue jsDOMCoreExceptionHIERARCHY_REQUEST_ERR(ExecState* exec, JSValue, const Identifier&)
       
   278 {
       
   279     return jsNumber(exec, static_cast<int>(3));
       
   280 }
       
   281 
       
   282 JSValue jsDOMCoreExceptionWRONG_DOCUMENT_ERR(ExecState* exec, JSValue, const Identifier&)
       
   283 {
       
   284     return jsNumber(exec, static_cast<int>(4));
       
   285 }
       
   286 
       
   287 JSValue jsDOMCoreExceptionINVALID_CHARACTER_ERR(ExecState* exec, JSValue, const Identifier&)
       
   288 {
       
   289     return jsNumber(exec, static_cast<int>(5));
       
   290 }
       
   291 
       
   292 JSValue jsDOMCoreExceptionNO_DATA_ALLOWED_ERR(ExecState* exec, JSValue, const Identifier&)
       
   293 {
       
   294     return jsNumber(exec, static_cast<int>(6));
       
   295 }
       
   296 
       
   297 JSValue jsDOMCoreExceptionNO_MODIFICATION_ALLOWED_ERR(ExecState* exec, JSValue, const Identifier&)
       
   298 {
       
   299     return jsNumber(exec, static_cast<int>(7));
       
   300 }
       
   301 
       
   302 JSValue jsDOMCoreExceptionNOT_FOUND_ERR(ExecState* exec, JSValue, const Identifier&)
       
   303 {
       
   304     return jsNumber(exec, static_cast<int>(8));
       
   305 }
       
   306 
       
   307 JSValue jsDOMCoreExceptionNOT_SUPPORTED_ERR(ExecState* exec, JSValue, const Identifier&)
       
   308 {
       
   309     return jsNumber(exec, static_cast<int>(9));
       
   310 }
       
   311 
       
   312 JSValue jsDOMCoreExceptionINUSE_ATTRIBUTE_ERR(ExecState* exec, JSValue, const Identifier&)
       
   313 {
       
   314     return jsNumber(exec, static_cast<int>(10));
       
   315 }
       
   316 
       
   317 JSValue jsDOMCoreExceptionINVALID_STATE_ERR(ExecState* exec, JSValue, const Identifier&)
       
   318 {
       
   319     return jsNumber(exec, static_cast<int>(11));
       
   320 }
       
   321 
       
   322 JSValue jsDOMCoreExceptionSYNTAX_ERR(ExecState* exec, JSValue, const Identifier&)
       
   323 {
       
   324     return jsNumber(exec, static_cast<int>(12));
       
   325 }
       
   326 
       
   327 JSValue jsDOMCoreExceptionINVALID_MODIFICATION_ERR(ExecState* exec, JSValue, const Identifier&)
       
   328 {
       
   329     return jsNumber(exec, static_cast<int>(13));
       
   330 }
       
   331 
       
   332 JSValue jsDOMCoreExceptionNAMESPACE_ERR(ExecState* exec, JSValue, const Identifier&)
       
   333 {
       
   334     return jsNumber(exec, static_cast<int>(14));
       
   335 }
       
   336 
       
   337 JSValue jsDOMCoreExceptionINVALID_ACCESS_ERR(ExecState* exec, JSValue, const Identifier&)
       
   338 {
       
   339     return jsNumber(exec, static_cast<int>(15));
       
   340 }
       
   341 
       
   342 JSValue jsDOMCoreExceptionVALIDATION_ERR(ExecState* exec, JSValue, const Identifier&)
       
   343 {
       
   344     return jsNumber(exec, static_cast<int>(16));
       
   345 }
       
   346 
       
   347 JSValue jsDOMCoreExceptionTYPE_MISMATCH_ERR(ExecState* exec, JSValue, const Identifier&)
       
   348 {
       
   349     return jsNumber(exec, static_cast<int>(17));
       
   350 }
       
   351 
       
   352 JSValue jsDOMCoreExceptionSECURITY_ERR(ExecState* exec, JSValue, const Identifier&)
       
   353 {
       
   354     return jsNumber(exec, static_cast<int>(18));
       
   355 }
       
   356 
       
   357 JSValue jsDOMCoreExceptionNETWORK_ERR(ExecState* exec, JSValue, const Identifier&)
       
   358 {
       
   359     return jsNumber(exec, static_cast<int>(19));
       
   360 }
       
   361 
       
   362 JSValue jsDOMCoreExceptionABORT_ERR(ExecState* exec, JSValue, const Identifier&)
       
   363 {
       
   364     return jsNumber(exec, static_cast<int>(20));
       
   365 }
       
   366 
       
   367 JSValue jsDOMCoreExceptionURL_MISMATCH_ERR(ExecState* exec, JSValue, const Identifier&)
       
   368 {
       
   369     return jsNumber(exec, static_cast<int>(21));
       
   370 }
       
   371 
       
   372 JSValue jsDOMCoreExceptionQUOTA_EXCEEDED_ERR(ExecState* exec, JSValue, const Identifier&)
       
   373 {
       
   374     return jsNumber(exec, static_cast<int>(22));
       
   375 }
       
   376 
       
   377 JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, DOMCoreException* object)
       
   378 {
       
   379     return getDOMObjectWrapper<JSDOMCoreException>(exec, globalObject, object);
       
   380 }
       
   381 DOMCoreException* toDOMCoreException(JSC::JSValue value)
       
   382 {
       
   383     return value.inherits(&JSDOMCoreException::s_info) ? static_cast<JSDOMCoreException*>(asObject(value))->impl() : 0;
       
   384 }
       
   385 
       
   386 }