Beispiel #1
0
bool JSNodeListOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> handle, void*, SlotVisitor& visitor)
{
    JSNodeList* jsNodeList = jsCast<JSNodeList*>(handle.get().asCell());
    if (!jsNodeList->hasCustomProperties())
        return false;
    if (!jsNodeList->impl()->isDynamicNodeList())
        return false;
    return visitor.containsOpaqueRoot(root(static_cast<DynamicNodeList*>(jsNodeList->impl())->node()));
}
Beispiel #2
0
bool JSNodeListOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> handle, void*, SlotVisitor& visitor)
{
    JSNodeList* jsNodeList = jsCast<JSNodeList*>(handle.slot()->asCell());
    if (!jsNodeList->hasCustomProperties())
        return false;
    if (jsNodeList->impl().isLiveNodeList())
        return visitor.containsOpaqueRoot(root(static_cast<LiveNodeList&>(jsNodeList->impl()).ownerNode()));
    if (jsNodeList->impl().isChildNodeList())
        return visitor.containsOpaqueRoot(root(static_cast<ChildNodeList&>(jsNodeList->impl()).ownerNode()));
    if (jsNodeList->impl().isEmptyNodeList())
        return visitor.containsOpaqueRoot(root(static_cast<EmptyNodeList&>(jsNodeList->impl()).ownerNode()));
    return false;
}