本文整理汇总了C++中StackVisitor::callee方法的典型用法代码示例。如果您正苦于以下问题:C++ StackVisitor::callee方法的具体用法?C++ StackVisitor::callee怎么用?C++ StackVisitor::callee使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类StackVisitor
的用法示例。
在下文中一共展示了StackVisitor::callee方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: operator
StackVisitor::Status operator()(StackVisitor& visitor) const
{
if (m_remainingCapacityForFrameCapture) {
// If callee is unknown, but we've not added any frame yet, we should
// still add the frame, because something called us, and gave us arguments.
JSObject* callee = visitor->callee();
if (!callee && visitor->index())
return StackVisitor::Done;
StringBuilder& builder = m_builder;
if (!builder.isEmpty())
builder.append('\n');
builder.append('#');
builder.appendNumber(visitor->index());
builder.append(' ');
builder.append(visitor->functionName());
builder.appendLiteral("() at ");
builder.append(visitor->sourceURL());
if (visitor->isJSFrame()) {
builder.append(':');
unsigned lineNumber;
unsigned unusedColumn;
visitor->computeLineAndColumn(lineNumber, unusedColumn);
builder.appendNumber(lineNumber);
}
if (!callee)
return StackVisitor::Done;
m_remainingCapacityForFrameCapture--;
return StackVisitor::Continue;
}
return StackVisitor::Done;
}
示例2: operator
StackVisitor::Status operator()(StackVisitor& visitor)
{
JSObject* callee = visitor->callee();
if (callee != m_targetCallee)
return StackVisitor::Continue;
m_result = JSValue(visitor->createArguments());
return StackVisitor::Done;
}
示例3: operator
StackVisitor::Status operator()(StackVisitor& visitor)
{
if (!m_hasSkippedFirstFrame) {
m_hasSkippedFirstFrame = true;
return StackVisitor::Continue;
}
unsigned line = 0;
unsigned column = 0;
visitor->computeLineAndColumn(line, column);
m_currentNode = ProfileNode::create(m_exec, LegacyProfiler::createCallIdentifier(m_exec, visitor->callee(), visitor->sourceURL(), line, column), m_rootNode.get());
// Assume that profile times are relative to when the |console.profile| command is evaluated.
// This matches the logic in JSStartProfiling() and InspectorTimelineAgent::startFromConsole().
m_currentNode->appendCall(ProfileNode::Call(0.0));
m_rootNode->spliceNode(m_currentNode.get());
m_foundParent = true;
return StackVisitor::Done;
}
示例4: operator
StackVisitor::Status operator()(StackVisitor& visitor)
{
if (!m_hasSkippedFirstFrame) {
m_hasSkippedFirstFrame = true;
return StackVisitor::Continue;
}
unsigned line = 0;
unsigned column = 0;
visitor->computeLineAndColumn(line, column);
m_currentNode = ProfileNode::create(m_exec, LegacyProfiler::createCallIdentifier(m_exec, visitor->callee(), visitor->sourceURL(), line, column), m_head.get(), m_head.get());
m_head->insertNode(m_currentNode.get());
m_foundParent = true;
return StackVisitor::Done;
}