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 "JSMutationRecord.h" |
23 | |
24 | #include "JSDOMAttribute.h" |
25 | #include "JSDOMBinding.h" |
26 | #include "JSDOMConstructorNotConstructable.h" |
27 | #include "JSDOMConvertInterface.h" |
28 | #include "JSDOMConvertNullable.h" |
29 | #include "JSDOMConvertStrings.h" |
30 | #include "JSDOMExceptionHandling.h" |
31 | #include "JSDOMGlobalObject.h" |
32 | #include "JSDOMWrapperCache.h" |
33 | #include "JSNode.h" |
34 | #include "JSNodeList.h" |
35 | #include "ScriptExecutionContext.h" |
36 | #include <JavaScriptCore/FunctionPrototype.h> |
37 | #include <JavaScriptCore/HeapSnapshotBuilder.h> |
38 | #include <JavaScriptCore/JSCInlines.h> |
39 | #include <wtf/GetPtr.h> |
40 | #include <wtf/PointerPreparations.h> |
41 | #include <wtf/URL.h> |
42 | |
43 | |
44 | namespace WebCore { |
45 | using namespace JSC; |
46 | |
47 | // Attributes |
48 | |
49 | JSC::EncodedJSValue jsMutationRecordConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
50 | bool setJSMutationRecordConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
51 | JSC::EncodedJSValue jsMutationRecordType(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
52 | JSC::EncodedJSValue jsMutationRecordTarget(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
53 | JSC::EncodedJSValue jsMutationRecordAddedNodes(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
54 | JSC::EncodedJSValue jsMutationRecordRemovedNodes(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
55 | JSC::EncodedJSValue jsMutationRecordPreviousSibling(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
56 | JSC::EncodedJSValue jsMutationRecordNextSibling(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
57 | JSC::EncodedJSValue jsMutationRecordAttributeName(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
58 | JSC::EncodedJSValue jsMutationRecordAttributeNamespace(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
59 | JSC::EncodedJSValue jsMutationRecordOldValue(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
60 | |
61 | class JSMutationRecordPrototype : public JSC::JSNonFinalObject { |
62 | public: |
63 | using Base = JSC::JSNonFinalObject; |
64 | static JSMutationRecordPrototype* create(JSC::VM& vm, JSDOMGlobalObject* globalObject, JSC::Structure* structure) |
65 | { |
66 | JSMutationRecordPrototype* ptr = new (NotNull, JSC::allocateCell<JSMutationRecordPrototype>(vm.heap)) JSMutationRecordPrototype(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 | |
77 | private: |
78 | JSMutationRecordPrototype(JSC::VM& vm, JSC::JSGlobalObject*, JSC::Structure* structure) |
79 | : JSC::JSNonFinalObject(vm, structure) |
80 | { |
81 | } |
82 | |
83 | void finishCreation(JSC::VM&); |
84 | }; |
85 | |
86 | using JSMutationRecordConstructor = JSDOMConstructorNotConstructable<JSMutationRecord>; |
87 | |
88 | template<> JSValue JSMutationRecordConstructor::prototypeForStructure(JSC::VM& vm, const JSDOMGlobalObject& globalObject) |
89 | { |
90 | UNUSED_PARAM(vm); |
91 | return globalObject.functionPrototype(); |
92 | } |
93 | |
94 | template<> void JSMutationRecordConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) |
95 | { |
96 | putDirect(vm, vm.propertyNames->prototype, JSMutationRecord::prototype(vm, globalObject), JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); |
97 | putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String("MutationRecord"_s )), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); |
98 | putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); |
99 | } |
100 | |
101 | template<> const ClassInfo JSMutationRecordConstructor::s_info = { "MutationRecord" , &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSMutationRecordConstructor) }; |
102 | |
103 | /* Hash table for prototype */ |
104 | |
105 | static const HashTableValue JSMutationRecordPrototypeTableValues[] = |
106 | { |
107 | { "constructor" , static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsMutationRecordConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSMutationRecordConstructor) } }, |
108 | { "type" , static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsMutationRecordType), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
109 | { "target" , static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsMutationRecordTarget), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
110 | { "addedNodes" , static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsMutationRecordAddedNodes), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
111 | { "removedNodes" , static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsMutationRecordRemovedNodes), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
112 | { "previousSibling" , static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsMutationRecordPreviousSibling), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
113 | { "nextSibling" , static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsMutationRecordNextSibling), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
114 | { "attributeName" , static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsMutationRecordAttributeName), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
115 | { "attributeNamespace" , static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsMutationRecordAttributeNamespace), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
116 | { "oldValue" , static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsMutationRecordOldValue), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
117 | }; |
118 | |
119 | const ClassInfo JSMutationRecordPrototype::s_info = { "MutationRecordPrototype" , &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSMutationRecordPrototype) }; |
120 | |
121 | void JSMutationRecordPrototype::finishCreation(VM& vm) |
122 | { |
123 | Base::finishCreation(vm); |
124 | reifyStaticProperties(vm, JSMutationRecord::info(), JSMutationRecordPrototypeTableValues, *this); |
125 | } |
126 | |
127 | const ClassInfo JSMutationRecord::s_info = { "MutationRecord" , &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSMutationRecord) }; |
128 | |
129 | JSMutationRecord::JSMutationRecord(Structure* structure, JSDOMGlobalObject& globalObject, Ref<MutationRecord>&& impl) |
130 | : JSDOMWrapper<MutationRecord>(structure, globalObject, WTFMove(impl)) |
131 | { |
132 | } |
133 | |
134 | void JSMutationRecord::finishCreation(VM& vm) |
135 | { |
136 | Base::finishCreation(vm); |
137 | ASSERT(inherits(vm, info())); |
138 | |
139 | } |
140 | |
141 | JSObject* JSMutationRecord::createPrototype(VM& vm, JSDOMGlobalObject& globalObject) |
142 | { |
143 | return JSMutationRecordPrototype::create(vm, &globalObject, JSMutationRecordPrototype::createStructure(vm, &globalObject, globalObject.objectPrototype())); |
144 | } |
145 | |
146 | JSObject* JSMutationRecord::prototype(VM& vm, JSDOMGlobalObject& globalObject) |
147 | { |
148 | return getDOMPrototype<JSMutationRecord>(vm, globalObject); |
149 | } |
150 | |
151 | JSValue JSMutationRecord::getConstructor(VM& vm, const JSGlobalObject* globalObject) |
152 | { |
153 | return getDOMConstructor<JSMutationRecordConstructor>(vm, *jsCast<const JSDOMGlobalObject*>(globalObject)); |
154 | } |
155 | |
156 | void JSMutationRecord::destroy(JSC::JSCell* cell) |
157 | { |
158 | JSMutationRecord* thisObject = static_cast<JSMutationRecord*>(cell); |
159 | thisObject->JSMutationRecord::~JSMutationRecord(); |
160 | } |
161 | |
162 | template<> inline JSMutationRecord* IDLAttribute<JSMutationRecord>::cast(ExecState& state, EncodedJSValue thisValue) |
163 | { |
164 | return jsDynamicCast<JSMutationRecord*>(state.vm(), JSValue::decode(thisValue)); |
165 | } |
166 | |
167 | EncodedJSValue jsMutationRecordConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName) |
168 | { |
169 | VM& vm = state->vm(); |
170 | auto throwScope = DECLARE_THROW_SCOPE(vm); |
171 | auto* prototype = jsDynamicCast<JSMutationRecordPrototype*>(vm, JSValue::decode(thisValue)); |
172 | if (UNLIKELY(!prototype)) |
173 | return throwVMTypeError(state, throwScope); |
174 | return JSValue::encode(JSMutationRecord::getConstructor(state->vm(), prototype->globalObject())); |
175 | } |
176 | |
177 | bool setJSMutationRecordConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
178 | { |
179 | VM& vm = state->vm(); |
180 | auto throwScope = DECLARE_THROW_SCOPE(vm); |
181 | auto* prototype = jsDynamicCast<JSMutationRecordPrototype*>(vm, JSValue::decode(thisValue)); |
182 | if (UNLIKELY(!prototype)) { |
183 | throwVMTypeError(state, throwScope); |
184 | return false; |
185 | } |
186 | // Shadowing a built-in constructor |
187 | return prototype->putDirect(vm, vm.propertyNames->constructor, JSValue::decode(encodedValue)); |
188 | } |
189 | |
190 | static inline JSValue jsMutationRecordTypeGetter(ExecState& state, JSMutationRecord& thisObject, ThrowScope& throwScope) |
191 | { |
192 | UNUSED_PARAM(throwScope); |
193 | UNUSED_PARAM(state); |
194 | auto& impl = thisObject.wrapped(); |
195 | JSValue result = toJS<IDLDOMString>(state, throwScope, impl.type()); |
196 | return result; |
197 | } |
198 | |
199 | EncodedJSValue jsMutationRecordType(ExecState* state, EncodedJSValue thisValue, PropertyName) |
200 | { |
201 | return IDLAttribute<JSMutationRecord>::get<jsMutationRecordTypeGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "type" ); |
202 | } |
203 | |
204 | static inline JSValue jsMutationRecordTargetGetter(ExecState& state, JSMutationRecord& thisObject, ThrowScope& throwScope) |
205 | { |
206 | UNUSED_PARAM(throwScope); |
207 | UNUSED_PARAM(state); |
208 | auto& impl = thisObject.wrapped(); |
209 | JSValue result = toJS<IDLInterface<Node>>(state, *thisObject.globalObject(), throwScope, impl.target()); |
210 | return result; |
211 | } |
212 | |
213 | EncodedJSValue jsMutationRecordTarget(ExecState* state, EncodedJSValue thisValue, PropertyName) |
214 | { |
215 | return IDLAttribute<JSMutationRecord>::get<jsMutationRecordTargetGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "target" ); |
216 | } |
217 | |
218 | static inline JSValue jsMutationRecordAddedNodesGetter(ExecState& state, JSMutationRecord& thisObject, ThrowScope& throwScope) |
219 | { |
220 | UNUSED_PARAM(throwScope); |
221 | UNUSED_PARAM(state); |
222 | auto& impl = thisObject.wrapped(); |
223 | JSValue result = toJS<IDLInterface<NodeList>>(state, *thisObject.globalObject(), throwScope, impl.addedNodes()); |
224 | return result; |
225 | } |
226 | |
227 | EncodedJSValue jsMutationRecordAddedNodes(ExecState* state, EncodedJSValue thisValue, PropertyName) |
228 | { |
229 | return IDLAttribute<JSMutationRecord>::get<jsMutationRecordAddedNodesGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "addedNodes" ); |
230 | } |
231 | |
232 | static inline JSValue jsMutationRecordRemovedNodesGetter(ExecState& state, JSMutationRecord& thisObject, ThrowScope& throwScope) |
233 | { |
234 | UNUSED_PARAM(throwScope); |
235 | UNUSED_PARAM(state); |
236 | auto& impl = thisObject.wrapped(); |
237 | JSValue result = toJS<IDLInterface<NodeList>>(state, *thisObject.globalObject(), throwScope, impl.removedNodes()); |
238 | return result; |
239 | } |
240 | |
241 | EncodedJSValue jsMutationRecordRemovedNodes(ExecState* state, EncodedJSValue thisValue, PropertyName) |
242 | { |
243 | return IDLAttribute<JSMutationRecord>::get<jsMutationRecordRemovedNodesGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "removedNodes" ); |
244 | } |
245 | |
246 | static inline JSValue jsMutationRecordPreviousSiblingGetter(ExecState& state, JSMutationRecord& thisObject, ThrowScope& throwScope) |
247 | { |
248 | UNUSED_PARAM(throwScope); |
249 | UNUSED_PARAM(state); |
250 | auto& impl = thisObject.wrapped(); |
251 | JSValue result = toJS<IDLNullable<IDLInterface<Node>>>(state, *thisObject.globalObject(), throwScope, impl.previousSibling()); |
252 | return result; |
253 | } |
254 | |
255 | EncodedJSValue jsMutationRecordPreviousSibling(ExecState* state, EncodedJSValue thisValue, PropertyName) |
256 | { |
257 | return IDLAttribute<JSMutationRecord>::get<jsMutationRecordPreviousSiblingGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "previousSibling" ); |
258 | } |
259 | |
260 | static inline JSValue jsMutationRecordNextSiblingGetter(ExecState& state, JSMutationRecord& thisObject, ThrowScope& throwScope) |
261 | { |
262 | UNUSED_PARAM(throwScope); |
263 | UNUSED_PARAM(state); |
264 | auto& impl = thisObject.wrapped(); |
265 | JSValue result = toJS<IDLNullable<IDLInterface<Node>>>(state, *thisObject.globalObject(), throwScope, impl.nextSibling()); |
266 | return result; |
267 | } |
268 | |
269 | EncodedJSValue jsMutationRecordNextSibling(ExecState* state, EncodedJSValue thisValue, PropertyName) |
270 | { |
271 | return IDLAttribute<JSMutationRecord>::get<jsMutationRecordNextSiblingGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "nextSibling" ); |
272 | } |
273 | |
274 | static inline JSValue jsMutationRecordAttributeNameGetter(ExecState& state, JSMutationRecord& thisObject, ThrowScope& throwScope) |
275 | { |
276 | UNUSED_PARAM(throwScope); |
277 | UNUSED_PARAM(state); |
278 | auto& impl = thisObject.wrapped(); |
279 | JSValue result = toJS<IDLNullable<IDLDOMString>>(state, throwScope, impl.attributeName()); |
280 | return result; |
281 | } |
282 | |
283 | EncodedJSValue jsMutationRecordAttributeName(ExecState* state, EncodedJSValue thisValue, PropertyName) |
284 | { |
285 | return IDLAttribute<JSMutationRecord>::get<jsMutationRecordAttributeNameGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "attributeName" ); |
286 | } |
287 | |
288 | static inline JSValue jsMutationRecordAttributeNamespaceGetter(ExecState& state, JSMutationRecord& thisObject, ThrowScope& throwScope) |
289 | { |
290 | UNUSED_PARAM(throwScope); |
291 | UNUSED_PARAM(state); |
292 | auto& impl = thisObject.wrapped(); |
293 | JSValue result = toJS<IDLNullable<IDLDOMString>>(state, throwScope, impl.attributeNamespace()); |
294 | return result; |
295 | } |
296 | |
297 | EncodedJSValue jsMutationRecordAttributeNamespace(ExecState* state, EncodedJSValue thisValue, PropertyName) |
298 | { |
299 | return IDLAttribute<JSMutationRecord>::get<jsMutationRecordAttributeNamespaceGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "attributeNamespace" ); |
300 | } |
301 | |
302 | static inline JSValue jsMutationRecordOldValueGetter(ExecState& state, JSMutationRecord& thisObject, ThrowScope& throwScope) |
303 | { |
304 | UNUSED_PARAM(throwScope); |
305 | UNUSED_PARAM(state); |
306 | auto& impl = thisObject.wrapped(); |
307 | JSValue result = toJS<IDLNullable<IDLDOMString>>(state, throwScope, impl.oldValue()); |
308 | return result; |
309 | } |
310 | |
311 | EncodedJSValue jsMutationRecordOldValue(ExecState* state, EncodedJSValue thisValue, PropertyName) |
312 | { |
313 | return IDLAttribute<JSMutationRecord>::get<jsMutationRecordOldValueGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "oldValue" ); |
314 | } |
315 | |
316 | void JSMutationRecord::visitChildren(JSCell* cell, SlotVisitor& visitor) |
317 | { |
318 | auto* thisObject = jsCast<JSMutationRecord*>(cell); |
319 | ASSERT_GC_OBJECT_INHERITS(thisObject, info()); |
320 | Base::visitChildren(thisObject, visitor); |
321 | thisObject->visitAdditionalChildren(visitor); |
322 | } |
323 | |
324 | void JSMutationRecord::visitOutputConstraints(JSCell* cell, SlotVisitor& visitor) |
325 | { |
326 | auto* thisObject = jsCast<JSMutationRecord*>(cell); |
327 | ASSERT_GC_OBJECT_INHERITS(thisObject, info()); |
328 | Base::visitOutputConstraints(thisObject, visitor); |
329 | thisObject->visitAdditionalChildren(visitor); |
330 | } |
331 | |
332 | void JSMutationRecord::heapSnapshot(JSCell* cell, HeapSnapshotBuilder& builder) |
333 | { |
334 | auto* thisObject = jsCast<JSMutationRecord*>(cell); |
335 | builder.setWrappedObjectForCell(cell, &thisObject->wrapped()); |
336 | if (thisObject->scriptExecutionContext()) |
337 | builder.setLabelForCell(cell, "url " + thisObject->scriptExecutionContext()->url().string()); |
338 | Base::heapSnapshot(cell, builder); |
339 | } |
340 | |
341 | bool JSMutationRecordOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> handle, void*, SlotVisitor& visitor, const char** reason) |
342 | { |
343 | UNUSED_PARAM(handle); |
344 | UNUSED_PARAM(visitor); |
345 | UNUSED_PARAM(reason); |
346 | return false; |
347 | } |
348 | |
349 | void JSMutationRecordOwner::finalize(JSC::Handle<JSC::Unknown> handle, void* context) |
350 | { |
351 | auto* jsMutationRecord = static_cast<JSMutationRecord*>(handle.slot()->asCell()); |
352 | auto& world = *static_cast<DOMWrapperWorld*>(context); |
353 | uncacheWrapper(world, &jsMutationRecord->wrapped(), jsMutationRecord); |
354 | } |
355 | |
356 | JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject* globalObject, Ref<MutationRecord>&& impl) |
357 | { |
358 | return createWrapper<MutationRecord>(globalObject, WTFMove(impl)); |
359 | } |
360 | |
361 | JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, MutationRecord& impl) |
362 | { |
363 | return wrap(state, globalObject, impl); |
364 | } |
365 | |
366 | MutationRecord* JSMutationRecord::toWrapped(JSC::VM& vm, JSC::JSValue value) |
367 | { |
368 | if (auto* wrapper = jsDynamicCast<JSMutationRecord*>(vm, value)) |
369 | return &wrapper->wrapped(); |
370 | return nullptr; |
371 | } |
372 | |
373 | } |
374 | |