本文整理汇总了C++中wtf::PassRefPtr::impl方法的典型用法代码示例。如果您正苦于以下问题:C++ PassRefPtr::impl方法的具体用法?C++ PassRefPtr::impl怎么用?C++ PassRefPtr::impl使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类wtf::PassRefPtr
的用法示例。
在下文中一共展示了PassRefPtr::impl方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: registerJSCell
void SamplerApollo::registerJSCell(JSGlobalObject* globalObject, JSCell* cell, size_t size)
{
WTF::PassRefPtr<SamplerJSCellNode> constructorNode = m_constructorNode.release();
if (UNLIKELY(!samplingNow))
return;
uint64_t globalObjectIdentifier = 0;
if (globalObject) {
BaseSamplerNode* globalObjectSample = getSamplerNodeFor(globalObject);
if (globalObjectSample)
globalObjectIdentifier = globalObjectSample->identifier();
}
PassRefPtr<SamplerJSCellNode> samplerNodeRef = adoptRef(new SamplerJSCellNode(globalObjectIdentifier, cell, size));
SamplerJSCellNode *samplerNode = samplerNodeRef.get();
if (registerNode(samplerNodeRef)) {
// cannot check the type because we are called directly from operator new
if (constructorNode.get() /* && cell->isObject() */) {
JSCell * const cell = constructorNode->impl();
// we don't want to make standard objects to show like Functions
// Internal construct for String,Boolean,... inherits directly InternalFunctions
if (! (cell && cell->getObject() && cell->getObject()->inherits(&InternalFunction::info) && !cell->getObject()->inherits(&JSFunction::info)) ) {
// try to set the name from the function
samplerNode->setObjectType(constructorNode->name());
}
}
}
}