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 "JSXMLHttpRequestEventTarget.h"
23
24#include "EventNames.h"
25#include "JSDOMAttribute.h"
26#include "JSDOMBinding.h"
27#include "JSDOMConstructorNotConstructable.h"
28#include "JSDOMExceptionHandling.h"
29#include "JSDOMWrapperCache.h"
30#include "JSEventListener.h"
31#include "ScriptExecutionContext.h"
32#include <JavaScriptCore/HeapSnapshotBuilder.h>
33#include <JavaScriptCore/JSCInlines.h>
34#include <wtf/GetPtr.h>
35#include <wtf/PointerPreparations.h>
36#include <wtf/URL.h>
37
38
39namespace WebCore {
40using namespace JSC;
41
42// Attributes
43
44JSC::EncodedJSValue jsXMLHttpRequestEventTargetConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
45bool setJSXMLHttpRequestEventTargetConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
46JSC::EncodedJSValue jsXMLHttpRequestEventTargetOnloadstart(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
47bool setJSXMLHttpRequestEventTargetOnloadstart(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
48JSC::EncodedJSValue jsXMLHttpRequestEventTargetOnprogress(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
49bool setJSXMLHttpRequestEventTargetOnprogress(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
50JSC::EncodedJSValue jsXMLHttpRequestEventTargetOnabort(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
51bool setJSXMLHttpRequestEventTargetOnabort(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
52JSC::EncodedJSValue jsXMLHttpRequestEventTargetOnerror(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
53bool setJSXMLHttpRequestEventTargetOnerror(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
54JSC::EncodedJSValue jsXMLHttpRequestEventTargetOnload(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
55bool setJSXMLHttpRequestEventTargetOnload(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
56JSC::EncodedJSValue jsXMLHttpRequestEventTargetOntimeout(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
57bool setJSXMLHttpRequestEventTargetOntimeout(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
58JSC::EncodedJSValue jsXMLHttpRequestEventTargetOnloadend(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
59bool setJSXMLHttpRequestEventTargetOnloadend(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
60
61class JSXMLHttpRequestEventTargetPrototype : public JSC::JSNonFinalObject {
62public:
63 using Base = JSC::JSNonFinalObject;
64 static JSXMLHttpRequestEventTargetPrototype* create(JSC::VM& vm, JSDOMGlobalObject* globalObject, JSC::Structure* structure)
65 {
66 JSXMLHttpRequestEventTargetPrototype* ptr = new (NotNull, JSC::allocateCell<JSXMLHttpRequestEventTargetPrototype>(vm.heap)) JSXMLHttpRequestEventTargetPrototype(vm, globalObject, structure);
67 ptr->finishCreation(vm);
68 return ptr;
69 }
70
71 DECLARE_INFO;
72 static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
73 {
74 return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
75 }
76
77private:
78 JSXMLHttpRequestEventTargetPrototype(JSC::VM& vm, JSC::JSGlobalObject*, JSC::Structure* structure)
79 : JSC::JSNonFinalObject(vm, structure)
80 {
81 }
82
83 void finishCreation(JSC::VM&);
84};
85
86using JSXMLHttpRequestEventTargetConstructor = JSDOMConstructorNotConstructable<JSXMLHttpRequestEventTarget>;
87
88template<> JSValue JSXMLHttpRequestEventTargetConstructor::prototypeForStructure(JSC::VM& vm, const JSDOMGlobalObject& globalObject)
89{
90 return JSEventTarget::getConstructor(vm, &globalObject);
91}
92
93template<> void JSXMLHttpRequestEventTargetConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject)
94{
95 putDirect(vm, vm.propertyNames->prototype, JSXMLHttpRequestEventTarget::prototype(vm, globalObject), JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum);
96 putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String("XMLHttpRequestEventTarget"_s)), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum);
97 putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum);
98}
99
100template<> const ClassInfo JSXMLHttpRequestEventTargetConstructor::s_info = { "XMLHttpRequestEventTarget", &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSXMLHttpRequestEventTargetConstructor) };
101
102/* Hash table for prototype */
103
104static const HashTableValue JSXMLHttpRequestEventTargetPrototypeTableValues[] =
105{
106 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsXMLHttpRequestEventTargetConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSXMLHttpRequestEventTargetConstructor) } },
107 { "onloadstart", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsXMLHttpRequestEventTargetOnloadstart), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSXMLHttpRequestEventTargetOnloadstart) } },
108 { "onprogress", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsXMLHttpRequestEventTargetOnprogress), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSXMLHttpRequestEventTargetOnprogress) } },
109 { "onabort", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsXMLHttpRequestEventTargetOnabort), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSXMLHttpRequestEventTargetOnabort) } },
110 { "onerror", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsXMLHttpRequestEventTargetOnerror), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSXMLHttpRequestEventTargetOnerror) } },
111 { "onload", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsXMLHttpRequestEventTargetOnload), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSXMLHttpRequestEventTargetOnload) } },
112 { "ontimeout", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsXMLHttpRequestEventTargetOntimeout), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSXMLHttpRequestEventTargetOntimeout) } },
113 { "onloadend", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsXMLHttpRequestEventTargetOnloadend), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSXMLHttpRequestEventTargetOnloadend) } },
114};
115
116const ClassInfo JSXMLHttpRequestEventTargetPrototype::s_info = { "XMLHttpRequestEventTargetPrototype", &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSXMLHttpRequestEventTargetPrototype) };
117
118void JSXMLHttpRequestEventTargetPrototype::finishCreation(VM& vm)
119{
120 Base::finishCreation(vm);
121 reifyStaticProperties(vm, JSXMLHttpRequestEventTarget::info(), JSXMLHttpRequestEventTargetPrototypeTableValues, *this);
122}
123
124const ClassInfo JSXMLHttpRequestEventTarget::s_info = { "XMLHttpRequestEventTarget", &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSXMLHttpRequestEventTarget) };
125
126JSXMLHttpRequestEventTarget::JSXMLHttpRequestEventTarget(Structure* structure, JSDOMGlobalObject& globalObject, Ref<XMLHttpRequestEventTarget>&& impl)
127 : JSEventTarget(structure, globalObject, WTFMove(impl))
128{
129}
130
131void JSXMLHttpRequestEventTarget::finishCreation(VM& vm)
132{
133 Base::finishCreation(vm);
134 ASSERT(inherits(vm, info()));
135
136}
137
138JSObject* JSXMLHttpRequestEventTarget::createPrototype(VM& vm, JSDOMGlobalObject& globalObject)
139{
140 return JSXMLHttpRequestEventTargetPrototype::create(vm, &globalObject, JSXMLHttpRequestEventTargetPrototype::createStructure(vm, &globalObject, JSEventTarget::prototype(vm, globalObject)));
141}
142
143JSObject* JSXMLHttpRequestEventTarget::prototype(VM& vm, JSDOMGlobalObject& globalObject)
144{
145 return getDOMPrototype<JSXMLHttpRequestEventTarget>(vm, globalObject);
146}
147
148JSValue JSXMLHttpRequestEventTarget::getConstructor(VM& vm, const JSGlobalObject* globalObject)
149{
150 return getDOMConstructor<JSXMLHttpRequestEventTargetConstructor>(vm, *jsCast<const JSDOMGlobalObject*>(globalObject));
151}
152
153template<> inline JSXMLHttpRequestEventTarget* IDLAttribute<JSXMLHttpRequestEventTarget>::cast(ExecState& state, EncodedJSValue thisValue)
154{
155 return jsDynamicCast<JSXMLHttpRequestEventTarget*>(state.vm(), JSValue::decode(thisValue));
156}
157
158EncodedJSValue jsXMLHttpRequestEventTargetConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
159{
160 VM& vm = state->vm();
161 auto throwScope = DECLARE_THROW_SCOPE(vm);
162 auto* prototype = jsDynamicCast<JSXMLHttpRequestEventTargetPrototype*>(vm, JSValue::decode(thisValue));
163 if (UNLIKELY(!prototype))
164 return throwVMTypeError(state, throwScope);
165 return JSValue::encode(JSXMLHttpRequestEventTarget::getConstructor(state->vm(), prototype->globalObject()));
166}
167
168bool setJSXMLHttpRequestEventTargetConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
169{
170 VM& vm = state->vm();
171 auto throwScope = DECLARE_THROW_SCOPE(vm);
172 auto* prototype = jsDynamicCast<JSXMLHttpRequestEventTargetPrototype*>(vm, JSValue::decode(thisValue));
173 if (UNLIKELY(!prototype)) {
174 throwVMTypeError(state, throwScope);
175 return false;
176 }
177 // Shadowing a built-in constructor
178 return prototype->putDirect(vm, vm.propertyNames->constructor, JSValue::decode(encodedValue));
179}
180
181static inline JSValue jsXMLHttpRequestEventTargetOnloadstartGetter(ExecState& state, JSXMLHttpRequestEventTarget& thisObject, ThrowScope& throwScope)
182{
183 UNUSED_PARAM(throwScope);
184 UNUSED_PARAM(state);
185 return eventHandlerAttribute(thisObject.wrapped(), eventNames().loadstartEvent, worldForDOMObject(thisObject));
186}
187
188EncodedJSValue jsXMLHttpRequestEventTargetOnloadstart(ExecState* state, EncodedJSValue thisValue, PropertyName)
189{
190 return IDLAttribute<JSXMLHttpRequestEventTarget>::get<jsXMLHttpRequestEventTargetOnloadstartGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "onloadstart");
191}
192
193static inline bool setJSXMLHttpRequestEventTargetOnloadstartSetter(ExecState& state, JSXMLHttpRequestEventTarget& thisObject, JSValue value, ThrowScope& throwScope)
194{
195 UNUSED_PARAM(throwScope);
196 setEventHandlerAttribute(state, thisObject, thisObject.wrapped(), eventNames().loadstartEvent, value);
197 return true;
198}
199
200bool setJSXMLHttpRequestEventTargetOnloadstart(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
201{
202 return IDLAttribute<JSXMLHttpRequestEventTarget>::set<setJSXMLHttpRequestEventTargetOnloadstartSetter>(*state, thisValue, encodedValue, "onloadstart");
203}
204
205static inline JSValue jsXMLHttpRequestEventTargetOnprogressGetter(ExecState& state, JSXMLHttpRequestEventTarget& thisObject, ThrowScope& throwScope)
206{
207 UNUSED_PARAM(throwScope);
208 UNUSED_PARAM(state);
209 return eventHandlerAttribute(thisObject.wrapped(), eventNames().progressEvent, worldForDOMObject(thisObject));
210}
211
212EncodedJSValue jsXMLHttpRequestEventTargetOnprogress(ExecState* state, EncodedJSValue thisValue, PropertyName)
213{
214 return IDLAttribute<JSXMLHttpRequestEventTarget>::get<jsXMLHttpRequestEventTargetOnprogressGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "onprogress");
215}
216
217static inline bool setJSXMLHttpRequestEventTargetOnprogressSetter(ExecState& state, JSXMLHttpRequestEventTarget& thisObject, JSValue value, ThrowScope& throwScope)
218{
219 UNUSED_PARAM(throwScope);
220 setEventHandlerAttribute(state, thisObject, thisObject.wrapped(), eventNames().progressEvent, value);
221 return true;
222}
223
224bool setJSXMLHttpRequestEventTargetOnprogress(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
225{
226 return IDLAttribute<JSXMLHttpRequestEventTarget>::set<setJSXMLHttpRequestEventTargetOnprogressSetter>(*state, thisValue, encodedValue, "onprogress");
227}
228
229static inline JSValue jsXMLHttpRequestEventTargetOnabortGetter(ExecState& state, JSXMLHttpRequestEventTarget& thisObject, ThrowScope& throwScope)
230{
231 UNUSED_PARAM(throwScope);
232 UNUSED_PARAM(state);
233 return eventHandlerAttribute(thisObject.wrapped(), eventNames().abortEvent, worldForDOMObject(thisObject));
234}
235
236EncodedJSValue jsXMLHttpRequestEventTargetOnabort(ExecState* state, EncodedJSValue thisValue, PropertyName)
237{
238 return IDLAttribute<JSXMLHttpRequestEventTarget>::get<jsXMLHttpRequestEventTargetOnabortGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "onabort");
239}
240
241static inline bool setJSXMLHttpRequestEventTargetOnabortSetter(ExecState& state, JSXMLHttpRequestEventTarget& thisObject, JSValue value, ThrowScope& throwScope)
242{
243 UNUSED_PARAM(throwScope);
244 setEventHandlerAttribute(state, thisObject, thisObject.wrapped(), eventNames().abortEvent, value);
245 return true;
246}
247
248bool setJSXMLHttpRequestEventTargetOnabort(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
249{
250 return IDLAttribute<JSXMLHttpRequestEventTarget>::set<setJSXMLHttpRequestEventTargetOnabortSetter>(*state, thisValue, encodedValue, "onabort");
251}
252
253static inline JSValue jsXMLHttpRequestEventTargetOnerrorGetter(ExecState& state, JSXMLHttpRequestEventTarget& thisObject, ThrowScope& throwScope)
254{
255 UNUSED_PARAM(throwScope);
256 UNUSED_PARAM(state);
257 return eventHandlerAttribute(thisObject.wrapped(), eventNames().errorEvent, worldForDOMObject(thisObject));
258}
259
260EncodedJSValue jsXMLHttpRequestEventTargetOnerror(ExecState* state, EncodedJSValue thisValue, PropertyName)
261{
262 return IDLAttribute<JSXMLHttpRequestEventTarget>::get<jsXMLHttpRequestEventTargetOnerrorGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "onerror");
263}
264
265static inline bool setJSXMLHttpRequestEventTargetOnerrorSetter(ExecState& state, JSXMLHttpRequestEventTarget& thisObject, JSValue value, ThrowScope& throwScope)
266{
267 UNUSED_PARAM(throwScope);
268 setEventHandlerAttribute(state, thisObject, thisObject.wrapped(), eventNames().errorEvent, value);
269 return true;
270}
271
272bool setJSXMLHttpRequestEventTargetOnerror(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
273{
274 return IDLAttribute<JSXMLHttpRequestEventTarget>::set<setJSXMLHttpRequestEventTargetOnerrorSetter>(*state, thisValue, encodedValue, "onerror");
275}
276
277static inline JSValue jsXMLHttpRequestEventTargetOnloadGetter(ExecState& state, JSXMLHttpRequestEventTarget& thisObject, ThrowScope& throwScope)
278{
279 UNUSED_PARAM(throwScope);
280 UNUSED_PARAM(state);
281 return eventHandlerAttribute(thisObject.wrapped(), eventNames().loadEvent, worldForDOMObject(thisObject));
282}
283
284EncodedJSValue jsXMLHttpRequestEventTargetOnload(ExecState* state, EncodedJSValue thisValue, PropertyName)
285{
286 return IDLAttribute<JSXMLHttpRequestEventTarget>::get<jsXMLHttpRequestEventTargetOnloadGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "onload");
287}
288
289static inline bool setJSXMLHttpRequestEventTargetOnloadSetter(ExecState& state, JSXMLHttpRequestEventTarget& thisObject, JSValue value, ThrowScope& throwScope)
290{
291 UNUSED_PARAM(throwScope);
292 setEventHandlerAttribute(state, thisObject, thisObject.wrapped(), eventNames().loadEvent, value);
293 return true;
294}
295
296bool setJSXMLHttpRequestEventTargetOnload(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
297{
298 return IDLAttribute<JSXMLHttpRequestEventTarget>::set<setJSXMLHttpRequestEventTargetOnloadSetter>(*state, thisValue, encodedValue, "onload");
299}
300
301static inline JSValue jsXMLHttpRequestEventTargetOntimeoutGetter(ExecState& state, JSXMLHttpRequestEventTarget& thisObject, ThrowScope& throwScope)
302{
303 UNUSED_PARAM(throwScope);
304 UNUSED_PARAM(state);
305 return eventHandlerAttribute(thisObject.wrapped(), eventNames().timeoutEvent, worldForDOMObject(thisObject));
306}
307
308EncodedJSValue jsXMLHttpRequestEventTargetOntimeout(ExecState* state, EncodedJSValue thisValue, PropertyName)
309{
310 return IDLAttribute<JSXMLHttpRequestEventTarget>::get<jsXMLHttpRequestEventTargetOntimeoutGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "ontimeout");
311}
312
313static inline bool setJSXMLHttpRequestEventTargetOntimeoutSetter(ExecState& state, JSXMLHttpRequestEventTarget& thisObject, JSValue value, ThrowScope& throwScope)
314{
315 UNUSED_PARAM(throwScope);
316 setEventHandlerAttribute(state, thisObject, thisObject.wrapped(), eventNames().timeoutEvent, value);
317 return true;
318}
319
320bool setJSXMLHttpRequestEventTargetOntimeout(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
321{
322 return IDLAttribute<JSXMLHttpRequestEventTarget>::set<setJSXMLHttpRequestEventTargetOntimeoutSetter>(*state, thisValue, encodedValue, "ontimeout");
323}
324
325static inline JSValue jsXMLHttpRequestEventTargetOnloadendGetter(ExecState& state, JSXMLHttpRequestEventTarget& thisObject, ThrowScope& throwScope)
326{
327 UNUSED_PARAM(throwScope);
328 UNUSED_PARAM(state);
329 return eventHandlerAttribute(thisObject.wrapped(), eventNames().loadendEvent, worldForDOMObject(thisObject));
330}
331
332EncodedJSValue jsXMLHttpRequestEventTargetOnloadend(ExecState* state, EncodedJSValue thisValue, PropertyName)
333{
334 return IDLAttribute<JSXMLHttpRequestEventTarget>::get<jsXMLHttpRequestEventTargetOnloadendGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "onloadend");
335}
336
337static inline bool setJSXMLHttpRequestEventTargetOnloadendSetter(ExecState& state, JSXMLHttpRequestEventTarget& thisObject, JSValue value, ThrowScope& throwScope)
338{
339 UNUSED_PARAM(throwScope);
340 setEventHandlerAttribute(state, thisObject, thisObject.wrapped(), eventNames().loadendEvent, value);
341 return true;
342}
343
344bool setJSXMLHttpRequestEventTargetOnloadend(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
345{
346 return IDLAttribute<JSXMLHttpRequestEventTarget>::set<setJSXMLHttpRequestEventTargetOnloadendSetter>(*state, thisValue, encodedValue, "onloadend");
347}
348
349void JSXMLHttpRequestEventTarget::heapSnapshot(JSCell* cell, HeapSnapshotBuilder& builder)
350{
351 auto* thisObject = jsCast<JSXMLHttpRequestEventTarget*>(cell);
352 builder.setWrappedObjectForCell(cell, &thisObject->wrapped());
353 if (thisObject->scriptExecutionContext())
354 builder.setLabelForCell(cell, "url " + thisObject->scriptExecutionContext()->url().string());
355 Base::heapSnapshot(cell, builder);
356}
357
358XMLHttpRequestEventTarget* JSXMLHttpRequestEventTarget::toWrapped(JSC::VM& vm, JSC::JSValue value)
359{
360 if (auto* wrapper = jsDynamicCast<JSXMLHttpRequestEventTarget*>(vm, value))
361 return &wrapper->wrapped();
362 return nullptr;
363}
364
365}
366