本文整理汇总了C++中SlotVisitor::containsOpaqueRoot方法的典型用法代码示例。如果您正苦于以下问题:C++ SlotVisitor::containsOpaqueRoot方法的具体用法?C++ SlotVisitor::containsOpaqueRoot怎么用?C++ SlotVisitor::containsOpaqueRoot使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SlotVisitor
的用法示例。
在下文中一共展示了SlotVisitor::containsOpaqueRoot方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: isReachableFromOpaqueRoots
bool JSBarPropOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> handle, void*, SlotVisitor& visitor)
{
JSBarProp* jsBarProp = jsCast<JSBarProp*>(handle.get().asCell());
if (!isObservable(jsBarProp))
return false;
Frame* root = jsBarProp->impl().frame();
if (!root)
return false;
return visitor.containsOpaqueRoot(root);
}
示例2: isReachableFromOpaqueRoots
bool JSDOMPluginArrayOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> handle, void*, SlotVisitor& visitor)
{
JSDOMPluginArray* jsDOMPluginArray = static_cast<JSDOMPluginArray*>(handle.get().asCell());
if (!isObservable(jsDOMPluginArray))
return false;
Frame* root = jsDOMPluginArray->impl()->frame();
if (!root)
return false;
return visitor.containsOpaqueRoot(root);
}
示例3: isReachableFromOpaqueRoots
bool JSMessagePortOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> handle, void*, SlotVisitor& visitor)
{
JSMessagePort* jsMessagePort = static_cast<JSMessagePort*>(handle.get().asCell());
if (jsMessagePort->impl()->hasPendingActivity())
return true;
if (!isObservable(jsMessagePort))
return false;
MessagePort* root = jsMessagePort->impl();
return visitor.containsOpaqueRoot(root);
}
示例4: isReachableFromOpaqueRoots
bool JSMutationObserverOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> handle, void*, SlotVisitor& visitor)
{
MutationObserver* observer = jsCast<JSMutationObserver*>(handle.get().asCell())->impl();
HashSet<Node*> observedNodes = observer->getObservedNodes();
for (HashSet<Node*>::iterator it = observedNodes.begin(); it != observedNodes.end(); ++it) {
if (visitor.containsOpaqueRoot(root(*it)))
return true;
}
return false;
}
示例5: isReachableFromOpaqueRoots
bool JSStyleSheetListOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> handle, void*, SlotVisitor& visitor)
{
JSStyleSheetList* jsStyleSheetList = static_cast<JSStyleSheetList*>(handle.get().asCell());
if (!isObservable(jsStyleSheetList))
return false;
Document* root = jsStyleSheetList->impl()->document();
if (!root)
return false;
return visitor.containsOpaqueRoot(root);
}
示例6: isReachableFromOpaqueRoots
bool JSStyleMediaOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> handle, void*, SlotVisitor& visitor)
{
JSStyleMedia* jsStyleMedia = static_cast<JSStyleMedia*>(handle.get().asCell());
if (!isObservable(jsStyleMedia))
return false;
Frame* root = jsStyleMedia->impl()->frame();
if (!root)
return false;
return visitor.containsOpaqueRoot(root);
}
示例7: isReachableFromOpaqueRoots
bool JSCSSValueOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> handle, void* context, SlotVisitor& visitor)
{
JSCSSValue* jsCSSValue = jsCast<JSCSSValue*>(handle.slot()->asCell());
if (!jsCSSValue->hasCustomProperties())
return false;
DOMWrapperWorld* world = static_cast<DOMWrapperWorld*>(context);
void* root = world->m_cssValueRoots.get(&jsCSSValue->wrapped());
if (!root)
return false;
return visitor.containsOpaqueRoot(root);
}
示例8: isReachableFromOpaqueRoots
bool JSNamedNodeMapOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> handle, void*, SlotVisitor& visitor)
{
JSNamedNodeMap* jsNamedNodeMap = static_cast<JSNamedNodeMap*>(handle.get().asCell());
if (!isObservable(jsNamedNodeMap))
return false;
Element* element = jsNamedNodeMap->impl()->element();
if (!element)
return false;
void* root = WebCore::root(element);
return visitor.containsOpaqueRoot(root);
}
示例9: isReachableFromOpaqueRoots
bool JSAudioTrackOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> handle, void*, SlotVisitor& visitor)
{
JSAudioTrack* jsAudioTrack = jsCast<JSAudioTrack*>(handle.get().asCell());
if (!isObservable(jsAudioTrack))
return false;
Element* element = jsAudioTrack->impl().element();
if (!element)
return false;
void* root = WebCore::root(element);
return visitor.containsOpaqueRoot(root);
}
示例10: isReachableFromOpaqueRoots
bool JSMutationObserverOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> handle, void*, SlotVisitor& visitor, const char**reason)
{
for (auto* node : jsCast<JSMutationObserver*>(handle.slot()->asCell())->wrapped().observedNodes()) {
if (visitor.containsOpaqueRoot(root(node))) {
if (UNLIKELY(reason))
*reason = "Reachable from observed nodes";
return true;
}
}
return false;
}
示例11: isReachableFromOpaqueRoots
bool JSTextTrackCueOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> handle, void*, SlotVisitor& visitor)
{
JSTextTrackCue* jsTextTrackCue = jsCast<JSTextTrackCue*>(handle.slot()->asCell());
TextTrackCue& textTrackCue = jsTextTrackCue->wrapped();
// If the cue is firing event listeners, its wrapper is reachable because
// the wrapper is responsible for marking those event listeners.
if (textTrackCue.isFiringEventListeners())
return true;
// If the cue is not associated with a track, it is not reachable.
if (!textTrackCue.track())
return false;
return visitor.containsOpaqueRoot(root(textTrackCue.track()));
}
示例12: isReachableFromOpaqueRoots
bool JSTextTrackCueOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> handle, void*, SlotVisitor& visitor)
{
JSTextTrackCue* jsTextTrackCue = jsCast<JSTextTrackCue*>(handle.get().asCell());
TextTrackCue* textTrackCue = static_cast<TextTrackCue*>(jsTextTrackCue->impl());
// If the cue is firing event listeners, its wrapper is reachable because
// the wrapper is responsible for marking those event listeners.
if (textTrackCue->isFiringEventListeners())
return true;
// If the cue has no event listeners and has no custom properties, it is not reachable.
if (!textTrackCue->hasEventListeners() && !jsTextTrackCue->hasCustomProperties())
return false;
// If the cue is not associated with a track, it is not reachable.
if (!textTrackCue->track())
return false;
return visitor.containsOpaqueRoot(root(textTrackCue->track()));
}
示例13:
bool JSNodeFilterCondition::WeakOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown>, void* context, SlotVisitor& visitor)
{
return visitor.containsOpaqueRoot(context);
}
示例14: isReachableFromOpaqueRoots
bool JSTestGenerateIsReachableOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> handle, void*, SlotVisitor& visitor)
{
auto* jsTestGenerateIsReachable = jsCast<JSTestGenerateIsReachable*>(handle.slot()->asCell());
TestGenerateIsReachable* root = &jsTestGenerateIsReachable->wrapped();
return visitor.containsOpaqueRoot(root);
}
示例15: isReachableFromOpaqueRoots
bool JSTestGenerateIsReachableOwner::isReachableFromOpaqueRoots(JSC::JSCell& cell, void*, SlotVisitor& visitor)
{
auto& jsTestGenerateIsReachable = jsCast<JSTestGenerateIsReachable&>(cell);
TestGenerateIsReachable* root = &jsTestGenerateIsReachable.impl();
return visitor.containsOpaqueRoot(root);
}