本文整理汇总了C++中SlotVisitor类的典型用法代码示例。如果您正苦于以下问题:C++ SlotVisitor类的具体用法?C++ SlotVisitor怎么用?C++ SlotVisitor使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了SlotVisitor类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: isReachableFromOpaqueRoots
bool JSWorkerLocationOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> handle, void*, SlotVisitor& visitor)
{
JSWorkerLocation* jsWorkerLocation = jsCast<JSWorkerLocation*>(handle.get().asCell());
if (!isObservable(jsWorkerLocation))
return false;
WorkerLocation* root = &jsWorkerLocation->impl();
return visitor.containsOpaqueRoot(root);
}
示例2: visitChildren
void JSWebGLRenderingContext::visitChildren(SlotVisitor& visitor)
{
ASSERT_GC_OBJECT_INHERITS(this, &s_info);
COMPILE_ASSERT(StructureFlags & OverridesVisitChildren, OverridesVisitChildrenWithoutSettingFlag);
ASSERT(structure()->typeInfo().overridesVisitChildren());
Base::visitChildren(visitor);
visitor.addOpaqueRoot(impl());
}
示例3: visitJSFunction
void JSEventListener::visitJSFunction(SlotVisitor& visitor)
{
// If m_wrapper is 0, then m_jsFunction is zombied, and should never be accessed.
if (!m_wrapper)
return;
visitor.appendUnbarrieredWeak(&m_jsFunction);
}
示例4: visitChildren
void Arguments::visitChildren(SlotVisitor& visitor)
{
JSObject::visitChildren(visitor);
if (d->registerArray)
visitor.appendValues(d->registerArray.get(), d->numParameters);
if (d->extraArguments) {
unsigned numExtraArguments = d->numArguments - d->numParameters;
visitor.appendValues(d->extraArguments, numExtraArguments);
}
visitor.append(&d->callee);
if (d->activation)
visitor.append(&d->activation);
}
示例5: visitChildren
void ProxyRevoke::visitChildren(JSCell* cell, SlotVisitor& visitor)
{
ProxyRevoke* thisObject = jsCast<ProxyRevoke*>(cell);
ASSERT_GC_OBJECT_INHERITS(thisObject, info());
Base::visitChildren(thisObject, visitor);
visitor.append(&thisObject->m_proxy);
}
示例6: visitChildren
void JSWebAssemblyMemory::visitChildren(JSCell* cell, SlotVisitor& visitor)
{
auto* thisObject = jsCast<JSWebAssemblyMemory*>(cell);
ASSERT_GC_OBJECT_INHERITS(thisObject, info());
Base::visitChildren(thisObject, visitor);
visitor.append(&thisObject->m_bufferWrapper);
}
示例7: isReachableFromOpaqueRoots
bool JSMutationObserverOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> handle, void*, SlotVisitor& visitor)
{
for (auto* node : jsCast<JSMutationObserver*>(handle.slot()->asCell())->wrapped().observedNodes()) {
if (visitor.containsOpaqueRoot(root(node)))
return true;
}
return false;
}
示例8: visitChildren
void JSCustomGetterSetterFunction::visitChildren(JSCell* cell, SlotVisitor& visitor)
{
JSCustomGetterSetterFunction* thisObject = jsCast<JSCustomGetterSetterFunction*>(cell);
ASSERT_GC_OBJECT_INHERITS(thisObject, info());
Base::visitChildren(thisObject, visitor);
visitor.append(thisObject->m_getterSetter);
}
示例9: visitChildren
void UnlinkedCodeBlock::visitChildren(JSCell* cell, SlotVisitor& visitor)
{
UnlinkedCodeBlock* thisObject = jsCast<UnlinkedCodeBlock*>(cell);
ASSERT_GC_OBJECT_INHERITS(thisObject, info());
Base::visitChildren(thisObject, visitor);
for (FunctionExpressionVector::iterator ptr = thisObject->m_functionDecls.begin(), end = thisObject->m_functionDecls.end(); ptr != end; ++ptr)
visitor.append(ptr);
for (FunctionExpressionVector::iterator ptr = thisObject->m_functionExprs.begin(), end = thisObject->m_functionExprs.end(); ptr != end; ++ptr)
visitor.append(ptr);
visitor.appendValues(thisObject->m_constantRegisters.data(), thisObject->m_constantRegisters.size());
if (thisObject->m_unlinkedInstructions)
visitor.reportExtraMemoryVisited(thisObject->m_unlinkedInstructions->sizeInBytes());
if (thisObject->m_rareData) {
for (size_t i = 0, end = thisObject->m_rareData->m_regexps.size(); i != end; i++)
visitor.append(&thisObject->m_rareData->m_regexps[i]);
}
}
示例10: visitChildren
void FunctionRareData::visitChildren(JSCell* cell, SlotVisitor& visitor)
{
FunctionRareData* rareData = jsCast<FunctionRareData*>(cell);
rareData->m_objectAllocationProfile.visitAggregate(visitor);
rareData->m_internalFunctionAllocationProfile.visitAggregate(visitor);
visitor.append(rareData->m_boundFunctionStructure);
}
示例11: isReachableFromOpaqueRoots
bool JSMediaListOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> handle, void*, SlotVisitor& visitor)
{
JSMediaList* jsMediaList = static_cast<JSMediaList*>(handle.get().asCell());
if (!isObservable(jsMediaList))
return false;
void* root = WebCore::root(jsMediaList->impl());
return visitor.containsOpaqueRoot(root);
}
示例12: isReachableFromOpaqueRoots
bool JSStyleSheetOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> handle, void*, SlotVisitor& visitor)
{
JSStyleSheet* jsStyleSheet = jsCast<JSStyleSheet*>(handle.get().asCell());
if (!isObservable(jsStyleSheet))
return false;
void* root = WebCore::root(&jsStyleSheet->impl());
return visitor.containsOpaqueRoot(root);
}
示例13: visitAdditionalChildren
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);
if (m_response)
visitor.append(&m_response);
}
示例14: isReachableFromOpaqueRoots
bool JSTestGenerateIsReachableOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> handle, void*, SlotVisitor& visitor)
{
JSTestGenerateIsReachable* jsTestGenerateIsReachable = jsCast<JSTestGenerateIsReachable*>(handle.get().asCell());
if (!isObservable(jsTestGenerateIsReachable))
return false;
TestGenerateIsReachable* root = &jsTestGenerateIsReachable->impl();
return visitor.containsOpaqueRoot(root);
}
示例15: visitChildren
void UnlinkedProgramCodeBlock::visitChildren(JSCell* cell, SlotVisitor& visitor)
{
UnlinkedProgramCodeBlock* thisObject = jsCast<UnlinkedProgramCodeBlock*>(cell);
ASSERT_GC_OBJECT_INHERITS(thisObject, info());
Base::visitChildren(thisObject, visitor);
for (size_t i = 0, end = thisObject->m_functionDeclarations.size(); i != end; i++)
visitor.append(&thisObject->m_functionDeclarations[i].second);
}