コード例 #1
0
void JSMessageChannel::visitAdditionalChildren(JSC::SlotVisitor& visitor)
{
    if (MessagePort* port = impl().port1())
        visitor.addOpaqueRoot(port);

    if (MessagePort* port = impl().port2())
        visitor.addOpaqueRoot(port);
}
コード例 #2
0
bool WebCoreTypedArrayController::JSArrayBufferOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> handle, void*, JSC::SlotVisitor& visitor)
{
    auto& wrapper = *JSC::jsCast<JSC::JSArrayBuffer*>(handle.slot()->asCell());
    if (!wrapper.hasCustomProperties())
        return false;
    return visitor.containsOpaqueRoot(wrapper.impl());
}
コード例 #3
0
void AllocatedPlaceholder::visitChildren(JSCell* cell, JSC::SlotVisitor& visitor) {
    Base::visitChildren(cell, visitor);

    AllocatedPlaceholder* object = jsCast<AllocatedPlaceholder*>(cell);

    visitor.append(&object->_instanceStructure);
}
コード例 #4
0
bool JSAPIWrapperObjectHandleOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> handle, void*, JSC::SlotVisitor& visitor, const char**)
{
    JSC::JSAPIWrapperObject* wrapperObject = JSC::jsCast<JSC::JSAPIWrapperObject*>(handle.get().asCell());
    // We use the JSGlobalObject when processing weak handles to prevent the situation where using
    // the same wrapped object in multiple global objects keeps all of the global objects alive.
    if (!wrapperObject->wrappedObject())
        return false;
    return JSC::Heap::isMarked(wrapperObject->structure()->globalObject()) && visitor.containsOpaqueRoot(wrapperObject->wrappedObject());
}
コード例 #5
0
void JSSVGElementInstance::visitChildren(JSC::JSCell* cell, JSC::SlotVisitor& visitor)
{
    JSSVGElementInstance* thisObject = static_cast<JSSVGElementInstance*>(cell);
    ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
    COMPILE_ASSERT(StructureFlags & JSC::OverridesVisitChildren, OverridesVisitChildrenWithoutSettingFlag);
    ASSERT(thisObject->structure()->typeInfo().overridesVisitChildren());
    Base::visitChildren(thisObject, visitor);
    visitor.addOpaqueRoot(root(thisObject->impl()->correspondingElement()));
}
コード例 #6
0
void JSSVGElementInstance::visitChildren(JSC::JSCell* cell, JSC::SlotVisitor& visitor)
{
    JSSVGElementInstance* thisObject = JSC::jsCast<JSSVGElementInstance*>(cell);
    ASSERT_GC_OBJECT_INHERITS(thisObject, info());
    COMPILE_ASSERT(StructureFlags & JSC::OverridesVisitChildren, OverridesVisitChildrenWithoutSettingFlag);
    ASSERT(thisObject->structure()->typeInfo().overridesVisitChildren());
    // Skip JSEventTarget::visitChildren because event listener registration is
    // forwarded to the corresponding element.
    JSEventTarget::Base::visitChildren(thisObject, visitor);
    visitor.addOpaqueRoot(root(thisObject->impl().correspondingElement()));
}
コード例 #7
0
void JSCryptoKeyPair::visitAdditionalChildren(JSC::SlotVisitor& visitor)
{
    visitor.addOpaqueRoot(impl().publicKey());
    visitor.addOpaqueRoot(impl().privateKey());
}
コード例 #8
0
void JSTreeWalker::visitAdditionalChildren(JSC::SlotVisitor& visitor)
{
    if (NodeFilter* filter = impl().filter())
        visitor.addOpaqueRoot(filter);
}
コード例 #9
0
void JSSVGElementInstance::visitAdditionalChildren(JSC::SlotVisitor& visitor)
{
    visitor.addOpaqueRoot(root(impl().correspondingElement()));
}
コード例 #10
0
void JSStyleSheet::visitAdditionalChildren(JSC::SlotVisitor& visitor)
{
    visitor.addOpaqueRoot(root(&impl()));
}
コード例 #11
0
void JSHTMLTemplateElement::visitAdditionalChildren(JSC::SlotVisitor& visitor)
{
    if (auto* content = wrapped().contentIfAvailable())
        visitor.addOpaqueRoot(root(content));
}