|
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 "JSCDATASection.h" |
|
23 |
|
24 #include "CDATASection.h" |
|
25 #include <wtf/GetPtr.h> |
|
26 |
|
27 using namespace JSC; |
|
28 |
|
29 namespace WebCore { |
|
30 |
|
31 ASSERT_CLASS_FITS_IN_CELL(JSCDATASection); |
|
32 |
|
33 /* Hash table */ |
|
34 #if ENABLE(JIT) |
|
35 #define THUNK_GENERATOR(generator) , generator |
|
36 #else |
|
37 #define THUNK_GENERATOR(generator) |
|
38 #endif |
|
39 |
|
40 static const HashTableValue JSCDATASectionTableValues[2] = |
|
41 { |
|
42 { "constructor", DontEnum | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsCDATASectionConstructor), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
43 { 0, 0, 0, 0 THUNK_GENERATOR(0) } |
|
44 }; |
|
45 |
|
46 #undef THUNK_GENERATOR |
|
47 static JSC_CONST_HASHTABLE HashTable JSCDATASectionTable = { 2, 1, JSCDATASectionTableValues, 0 }; |
|
48 /* Hash table for constructor */ |
|
49 #if ENABLE(JIT) |
|
50 #define THUNK_GENERATOR(generator) , generator |
|
51 #else |
|
52 #define THUNK_GENERATOR(generator) |
|
53 #endif |
|
54 |
|
55 static const HashTableValue JSCDATASectionConstructorTableValues[1] = |
|
56 { |
|
57 { 0, 0, 0, 0 THUNK_GENERATOR(0) } |
|
58 }; |
|
59 |
|
60 #undef THUNK_GENERATOR |
|
61 static JSC_CONST_HASHTABLE HashTable JSCDATASectionConstructorTable = { 1, 0, JSCDATASectionConstructorTableValues, 0 }; |
|
62 class JSCDATASectionConstructor : public DOMConstructorObject { |
|
63 public: |
|
64 JSCDATASectionConstructor(JSC::ExecState*, JSDOMGlobalObject*); |
|
65 |
|
66 virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&); |
|
67 virtual bool getOwnPropertyDescriptor(JSC::ExecState*, const JSC::Identifier&, JSC::PropertyDescriptor&); |
|
68 virtual const JSC::ClassInfo* classInfo() const { return &s_info; } |
|
69 static const JSC::ClassInfo s_info; |
|
70 static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype) |
|
71 { |
|
72 return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount); |
|
73 } |
|
74 protected: |
|
75 static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | JSC::ImplementsHasInstance | DOMConstructorObject::StructureFlags; |
|
76 }; |
|
77 |
|
78 const ClassInfo JSCDATASectionConstructor::s_info = { "CDATASectionConstructor", 0, &JSCDATASectionConstructorTable, 0 }; |
|
79 |
|
80 JSCDATASectionConstructor::JSCDATASectionConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) |
|
81 : DOMConstructorObject(JSCDATASectionConstructor::createStructure(globalObject->objectPrototype()), globalObject) |
|
82 { |
|
83 putDirect(exec->propertyNames().prototype, JSCDATASectionPrototype::self(exec, globalObject), DontDelete | ReadOnly); |
|
84 } |
|
85 |
|
86 bool JSCDATASectionConstructor::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) |
|
87 { |
|
88 return getStaticValueSlot<JSCDATASectionConstructor, DOMObject>(exec, &JSCDATASectionConstructorTable, this, propertyName, slot); |
|
89 } |
|
90 |
|
91 bool JSCDATASectionConstructor::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) |
|
92 { |
|
93 return getStaticValueDescriptor<JSCDATASectionConstructor, DOMObject>(exec, &JSCDATASectionConstructorTable, this, propertyName, descriptor); |
|
94 } |
|
95 |
|
96 /* Hash table for prototype */ |
|
97 #if ENABLE(JIT) |
|
98 #define THUNK_GENERATOR(generator) , generator |
|
99 #else |
|
100 #define THUNK_GENERATOR(generator) |
|
101 #endif |
|
102 |
|
103 static const HashTableValue JSCDATASectionPrototypeTableValues[1] = |
|
104 { |
|
105 { 0, 0, 0, 0 THUNK_GENERATOR(0) } |
|
106 }; |
|
107 |
|
108 #undef THUNK_GENERATOR |
|
109 static JSC_CONST_HASHTABLE HashTable JSCDATASectionPrototypeTable = { 1, 0, JSCDATASectionPrototypeTableValues, 0 }; |
|
110 const ClassInfo JSCDATASectionPrototype::s_info = { "CDATASectionPrototype", 0, &JSCDATASectionPrototypeTable, 0 }; |
|
111 |
|
112 JSObject* JSCDATASectionPrototype::self(ExecState* exec, JSGlobalObject* globalObject) |
|
113 { |
|
114 return getDOMPrototype<JSCDATASection>(exec, globalObject); |
|
115 } |
|
116 |
|
117 const ClassInfo JSCDATASection::s_info = { "CDATASection", &JSText::s_info, &JSCDATASectionTable, 0 }; |
|
118 |
|
119 JSCDATASection::JSCDATASection(NonNullPassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<CDATASection> impl) |
|
120 : JSText(structure, globalObject, impl) |
|
121 { |
|
122 } |
|
123 |
|
124 JSObject* JSCDATASection::createPrototype(ExecState* exec, JSGlobalObject* globalObject) |
|
125 { |
|
126 return new (exec) JSCDATASectionPrototype(globalObject, JSCDATASectionPrototype::createStructure(JSTextPrototype::self(exec, globalObject))); |
|
127 } |
|
128 |
|
129 bool JSCDATASection::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) |
|
130 { |
|
131 return getStaticValueSlot<JSCDATASection, Base>(exec, &JSCDATASectionTable, this, propertyName, slot); |
|
132 } |
|
133 |
|
134 bool JSCDATASection::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) |
|
135 { |
|
136 return getStaticValueDescriptor<JSCDATASection, Base>(exec, &JSCDATASectionTable, this, propertyName, descriptor); |
|
137 } |
|
138 |
|
139 JSValue jsCDATASectionConstructor(ExecState* exec, JSValue slotBase, const Identifier&) |
|
140 { |
|
141 JSCDATASection* domObject = static_cast<JSCDATASection*>(asObject(slotBase)); |
|
142 return JSCDATASection::getConstructor(exec, domObject->globalObject()); |
|
143 } |
|
144 JSValue JSCDATASection::getConstructor(ExecState* exec, JSGlobalObject* globalObject) |
|
145 { |
|
146 return getDOMConstructor<JSCDATASectionConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); |
|
147 } |
|
148 |
|
149 |
|
150 } |