void JSXMLHttpRequest::visitChildren(JSCell* cell, SlotVisitor& visitor) { JSXMLHttpRequest* thisObject = jsCast<JSXMLHttpRequest*>(cell); ASSERT_GC_OBJECT_INHERITS(thisObject, info()); COMPILE_ASSERT(StructureFlags & OverridesVisitChildren, OverridesVisitChildrenWithoutSettingFlag); ASSERT(thisObject->structure()->typeInfo().overridesVisitChildren()); Base::visitChildren(thisObject, visitor); if (XMLHttpRequestUpload* upload = thisObject->m_impl->optionalUpload()) visitor.addOpaqueRoot(upload); if (Document* responseDocument = thisObject->m_impl->optionalResponseXML()) visitor.addOpaqueRoot(responseDocument); if (ArrayBuffer* responseArrayBuffer = thisObject->m_impl->optionalResponseArrayBuffer()) visitor.addOpaqueRoot(responseArrayBuffer); if (Blob* responseBlob = thisObject->m_impl->optionalResponseBlob()) visitor.addOpaqueRoot(responseBlob); if (thisObject->m_response) visitor.append(&thisObject->m_response); thisObject->m_impl->visitJSEventListeners(visitor); }
void JSWorkerGlobalScope::visitAdditionalChildren(SlotVisitor& visitor) { if (WorkerLocation* location = impl().optionalLocation()) visitor.addOpaqueRoot(location); if (WorkerNavigator* navigator = impl().optionalNavigator()) visitor.addOpaqueRoot(navigator); }
void JSDOMQuad::visitAdditionalChildren(SlotVisitor& visitor) { visitor.addOpaqueRoot(const_cast<DOMPoint*>(&wrapped().p1())); visitor.addOpaqueRoot(const_cast<DOMPoint*>(&wrapped().p2())); visitor.addOpaqueRoot(const_cast<DOMPoint*>(&wrapped().p3())); visitor.addOpaqueRoot(const_cast<DOMPoint*>(&wrapped().p4())); }
void JSXMLHttpRequest::visitAdditionalChildren(SlotVisitor& visitor) { if (XMLHttpRequestUpload* upload = wrapped().optionalUpload()) visitor.addOpaqueRoot(upload); if (Document* responseDocument = wrapped().optionalResponseXML()) visitor.addOpaqueRoot(responseDocument); }
void JSWorkerGlobalScope::visitAdditionalChildren(SlotVisitor& visitor) { if (WorkerLocation* location = wrapped().optionalLocation()) visitor.addOpaqueRoot(location); if (WorkerNavigator* navigator = wrapped().optionalNavigator()) visitor.addOpaqueRoot(navigator); visitor.addOpaqueRoot(wrapped().scriptExecutionContext()); }
void JSMessageChannel::visitChildren(SlotVisitor& visitor) { Base::visitChildren(visitor); if (MessagePort* port = m_impl->port1()) visitor.addOpaqueRoot(port); if (MessagePort* port = m_impl->port2()) visitor.addOpaqueRoot(port); }
void JSXMLHttpRequest::visitAdditionalChildren(SlotVisitor& visitor) { if (XMLHttpRequestUpload* upload = impl().optionalUpload()) visitor.addOpaqueRoot(upload); if (Document* responseDocument = impl().optionalResponseXML()) visitor.addOpaqueRoot(responseDocument); if (ArrayBuffer* responseArrayBuffer = impl().optionalResponseArrayBuffer()) visitor.addOpaqueRoot(responseArrayBuffer); if (Blob* responseBlob = impl().optionalResponseBlob()) visitor.addOpaqueRoot(responseBlob); }
void JSWorkerContext::visitChildren(SlotVisitor& visitor) { ASSERT_GC_OBJECT_INHERITS(this, &s_info); COMPILE_ASSERT(StructureFlags & OverridesVisitChildren, OverridesVisitChildrenWithoutSettingFlag); ASSERT(structure()->typeInfo().overridesVisitChildren()); Base::visitChildren(visitor); if (WorkerLocation* location = impl()->optionalLocation()) visitor.addOpaqueRoot(location); if (WorkerNavigator* navigator = impl()->optionalNavigator()) visitor.addOpaqueRoot(navigator); impl()->visitJSEventListeners(visitor); }
void JSWorkerGlobalScope::visitAdditionalChildren(SlotVisitor& visitor) { if (auto* location = wrapped().optionalLocation()) visitor.addOpaqueRoot(location); if (auto* navigator = wrapped().optionalNavigator()) visitor.addOpaqueRoot(navigator); ScriptExecutionContext& context = wrapped(); visitor.addOpaqueRoot(&context); // Normally JSEventTargetCustom.cpp's JSEventTarget::visitAdditionalChildren() would call this. But // even though WorkerGlobalScope is an EventTarget, JSWorkerGlobalScope does not subclass // JSEventTarget, so we need to do this here. wrapped().visitJSEventListeners(visitor); }
void JSMessageChannel::visitChildren(JSCell* cell, SlotVisitor& visitor) { JSMessageChannel* thisObject = jsCast<JSMessageChannel*>(cell); ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info); COMPILE_ASSERT(StructureFlags & OverridesVisitChildren, OverridesVisitChildrenWithoutSettingFlag); ASSERT(thisObject->structure()->typeInfo().overridesVisitChildren()); Base::visitChildren(thisObject, visitor); if (MessagePort* port = thisObject->m_impl->port1()) visitor.addOpaqueRoot(port); if (MessagePort* port = thisObject->m_impl->port2()) visitor.addOpaqueRoot(port); }
void JSWorkerGlobalScope::visitChildren(JSCell* cell, SlotVisitor& visitor) { JSWorkerGlobalScope* thisObject = jsCast<JSWorkerGlobalScope*>(cell); ASSERT_GC_OBJECT_INHERITS(thisObject, info()); COMPILE_ASSERT(StructureFlags & OverridesVisitChildren, OverridesVisitChildrenWithoutSettingFlag); ASSERT(thisObject->structure()->typeInfo().overridesVisitChildren()); Base::visitChildren(thisObject, visitor); if (WorkerLocation* location = thisObject->impl()->optionalLocation()) visitor.addOpaqueRoot(location); if (WorkerNavigator* navigator = thisObject->impl()->optionalNavigator()) visitor.addOpaqueRoot(navigator); thisObject->impl()->visitJSEventListeners(visitor); }
void JSTreeWalker::visitChildren(SlotVisitor& visitor) { Base::visitChildren(visitor); if (NodeFilter* filter = m_impl->filter()) visitor.addOpaqueRoot(filter); }
void JSCSSRule::visitChildren(SlotVisitor& visitor) { ASSERT_GC_OBJECT_INHERITS(this, &s_info); COMPILE_ASSERT(StructureFlags & OverridesVisitChildren, OverridesVisitChildrenWithoutSettingFlag); ASSERT(structure()->typeInfo().overridesVisitChildren()); Base::visitChildren(visitor); visitor.addOpaqueRoot(root(impl())); }
void JSStyleSheet::visitChildren(JSCell* cell, SlotVisitor& visitor) { JSStyleSheet* thisObject = jsCast<JSStyleSheet*>(cell); ASSERT_GC_OBJECT_INHERITS(thisObject, info()); COMPILE_ASSERT(StructureFlags & OverridesVisitChildren, OverridesVisitChildrenWithoutSettingFlag); ASSERT(thisObject->structure()->typeInfo().overridesVisitChildren()); Base::visitChildren(thisObject, visitor); visitor.addOpaqueRoot(root(&thisObject->impl())); }
void JSWebGLRenderingContext::visitChildren(JSCell* cell, SlotVisitor& visitor) { JSWebGLRenderingContext* thisObject = static_cast<JSWebGLRenderingContext*>(cell); ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info); COMPILE_ASSERT(StructureFlags & OverridesVisitChildren, OverridesVisitChildrenWithoutSettingFlag); ASSERT(thisObject->structure()->typeInfo().overridesVisitChildren()); Base::visitChildren(thisObject, visitor); visitor.addOpaqueRoot(thisObject->impl()); }
void JSMessagePort::visitChildren(SlotVisitor& visitor) { Base::visitChildren(visitor); // If we have a locally entangled port, we can directly mark it as reachable. Ports that are remotely entangled are marked in-use by markActiveObjectsForContext(). if (MessagePort* port = m_impl->locallyEntangledPort()) visitor.addOpaqueRoot(port); m_impl->visitJSEventListeners(visitor); }
void JSSharedWorker::visitChildren(SlotVisitor& visitor) { ASSERT_GC_OBJECT_INHERITS(this, &s_info); COMPILE_ASSERT(StructureFlags & OverridesVisitChildren, OverridesVisitChildrenWithoutSettingFlag); ASSERT(structure()->typeInfo().overridesVisitChildren()); Base::visitChildren(visitor); if (MessagePort* port = impl()->port()) visitor.addOpaqueRoot(port); }
void JSXMLHttpRequest::visitChildren(SlotVisitor& visitor) { Base::visitChildren(visitor); if (XMLHttpRequestUpload* upload = m_impl->optionalUpload()) visitor.addOpaqueRoot(upload); if (Document* responseDocument = m_impl->optionalResponseXML()) visitor.addOpaqueRoot(responseDocument); if (ArrayBuffer* responseArrayBuffer = m_impl->optionalResponseArrayBuffer()) visitor.addOpaqueRoot(responseArrayBuffer); #if ENABLE(XHR_RESPONSE_BLOB) if (Blob* responseBlob = m_impl->optionalResponseBlob()) visitor.addOpaqueRoot(responseBlob); #endif m_impl->visitJSEventListeners(visitor); }
void JSTreeWalker::visitChildren(JSCell* cell, SlotVisitor& visitor) { JSTreeWalker* thisObject = jsCast<JSTreeWalker*>(cell); ASSERT_GC_OBJECT_INHERITS(thisObject, info()); COMPILE_ASSERT(StructureFlags & OverridesVisitChildren, OverridesVisitChildrenWithoutSettingFlag); ASSERT(thisObject->structure()->typeInfo().overridesVisitChildren()); Base::visitChildren(thisObject, visitor); if (NodeFilter* filter = thisObject->m_impl->filter()) visitor.addOpaqueRoot(filter); }
void JSMediaSource::visitAdditionalChildren(SlotVisitor& visitor) { MediaSource* mediaSource = static_cast<MediaSource*>(&impl()); visitor.addOpaqueRoot(mediaSource); // -- end boiler plate code -- // Mark SourceBufferList SourceBufferList* sourceBufferList = mediaSource->sourceBuffers(); if (sourceBufferList) { visitor.addOpaqueRoot(sourceBufferList); // Mark SourceBuffer for (unsigned long i = 0, len = sourceBufferList->length(); i < len; i++) { SourceBuffer* sourceBuffer = sourceBufferList->item(i); if (sourceBuffer) visitor.addOpaqueRoot(sourceBuffer); } } }
void JSVideoTrack::visitChildren(JSCell* cell, SlotVisitor& visitor) { JSVideoTrack* jsVideoTrack = jsCast<JSVideoTrack*>(cell); ASSERT_GC_OBJECT_INHERITS(jsVideoTrack, info()); COMPILE_ASSERT(StructureFlags & OverridesVisitChildren, OverridesVisitChildrenWithoutSettingFlag); ASSERT(jsVideoTrack->structure()->typeInfo().overridesVisitChildren()); Base::visitChildren(jsVideoTrack, visitor); VideoTrack& videoTrack = jsVideoTrack->impl(); visitor.addOpaqueRoot(root(&videoTrack)); }
void JSNode::visitChildren(SlotVisitor& visitor) { ASSERT_GC_OBJECT_INHERITS(this, &s_info); COMPILE_ASSERT(StructureFlags & OverridesVisitChildren, OverridesVisitChildrenWithoutSettingFlag); ASSERT(structure()->typeInfo().overridesVisitChildren()); Base::visitChildren(visitor); Node* node = m_impl.get(); node->visitJSEventListeners(visitor); visitor.addOpaqueRoot(root(node)); }
void JSArrayBufferView::visitChildren(JSCell* cell, SlotVisitor& visitor) { JSArrayBufferView* thisObject = jsCast<JSArrayBufferView*>(cell); if (thisObject->hasArrayBuffer()) { ArrayBuffer* buffer = thisObject->buffer(); RELEASE_ASSERT(buffer); visitor.addOpaqueRoot(buffer); } Base::visitChildren(thisObject, visitor); }
void JSDOMWindow::visitChildren(JSCell* cell, SlotVisitor& visitor) { JSDOMWindow* thisObject = jsCast<JSDOMWindow*>(cell); ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info); COMPILE_ASSERT(StructureFlags & OverridesVisitChildren, OverridesVisitChildrenWithoutSettingFlag); ASSERT(thisObject->structure()->typeInfo().overridesVisitChildren()); Base::visitChildren(thisObject, visitor); thisObject->impl()->visitJSEventListeners(visitor); if (Frame* frame = thisObject->impl()->frame()) visitor.addOpaqueRoot(frame); }
void JSAttr::visitChildren(SlotVisitor& visitor) { ASSERT_GC_OBJECT_INHERITS(this, &s_info); COMPILE_ASSERT(StructureFlags & OverridesVisitChildren, OverridesVisitChildrenWithoutSettingFlag); ASSERT(structure()->typeInfo().overridesVisitChildren()); Base::visitChildren(visitor); Element* element = impl()->ownerElement(); if (!element) return; visitor.addOpaqueRoot(root(element)); }
void JSAudioTrackList::visitChildren(JSCell* cell, SlotVisitor& visitor) { JSAudioTrackList* jsAudioTrackList = jsCast<JSAudioTrackList*>(cell); ASSERT_GC_OBJECT_INHERITS(jsAudioTrackList, info()); COMPILE_ASSERT(StructureFlags & OverridesVisitChildren, OverridesVisitChildrenWithoutSettingFlag); ASSERT(jsAudioTrackList->structure()->typeInfo().overridesVisitChildren()); Base::visitChildren(jsAudioTrackList, visitor); AudioTrackList* audioTrackList = static_cast<AudioTrackList*>(jsAudioTrackList->impl()); visitor.addOpaqueRoot(root(audioTrackList->element())); audioTrackList->visitJSEventListeners(visitor); }
void JSMessagePort::visitChildren(SlotVisitor& visitor) { ASSERT_GC_OBJECT_INHERITS(this, &s_info); COMPILE_ASSERT(StructureFlags & OverridesVisitChildren, OverridesVisitChildrenWithoutSettingFlag); ASSERT(structure()->typeInfo().overridesVisitChildren()); Base::visitChildren(visitor); // If we have a locally entangled port, we can directly mark it as reachable. Ports that are remotely entangled are marked in-use by markActiveObjectsForContext(). if (MessagePort* port = m_impl->locallyEntangledPort()) visitor.addOpaqueRoot(port); m_impl->visitJSEventListeners(visitor); }
void JSTextTrack::visitChildren(JSCell* cell, SlotVisitor& visitor) { JSTextTrack* jsTextTrack = jsCast<JSTextTrack*>(cell); ASSERT_GC_OBJECT_INHERITS(jsTextTrack, &s_info); COMPILE_ASSERT(StructureFlags & OverridesVisitChildren, OverridesVisitChildrenWithoutSettingFlag); ASSERT(jsTextTrack->structure()->typeInfo().overridesVisitChildren()); Base::visitChildren(jsTextTrack, visitor); TextTrack* textTrack = static_cast<TextTrack*>(jsTextTrack->impl()); visitor.addOpaqueRoot(root(textTrack)); textTrack->visitJSEventListeners(visitor); }
void JSAttr::visitChildren(JSCell* cell, SlotVisitor& visitor) { JSAttr* thisObject = jsCast<JSAttr*>(cell); ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info); COMPILE_ASSERT(StructureFlags & OverridesVisitChildren, OverridesVisitChildrenWithoutSettingFlag); ASSERT(thisObject->structure()->typeInfo().overridesVisitChildren()); Base::visitChildren(thisObject, visitor); Element* element = thisObject->impl()->ownerElement(); if (!element) return; visitor.addOpaqueRoot(root(element)); }
void JSNode::visitChildren(JSCell* cell, SlotVisitor& visitor) { JSNode* thisObject = jsCast<JSNode*>(cell); ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info); COMPILE_ASSERT(StructureFlags & OverridesVisitChildren, OverridesVisitChildrenWithoutSettingFlag); ASSERT(thisObject->structure()->typeInfo().overridesVisitChildren()); Base::visitChildren(thisObject, visitor); Node* node = thisObject->impl(); node->visitJSEventListeners(visitor); visitor.addOpaqueRoot(root(node)); }