本文整理汇总了C++中StackVisitor类的典型用法代码示例。如果您正苦于以下问题:C++ StackVisitor类的具体用法?C++ StackVisitor怎么用?C++ StackVisitor使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了StackVisitor类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: operator
StackVisitor::Status operator()(StackVisitor& visitor)
{
if (visitor->callFrame() == m_callFrame) {
m_callerFrame = visitor->callerFrame();
return StackVisitor::Done;
}
return StackVisitor::Continue;
}
示例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 unusedColumn = 0;
visitor->computeLineAndColumn(line, unusedColumn);
m_line = line;
m_url = visitor->sourceURL();
return StackVisitor::Done;
}
示例4: operator
StackVisitor::Status operator()(StackVisitor& visitor)
{
if (!m_foundStartCallFrame && (visitor->callFrame() == m_startCallFrame))
m_foundStartCallFrame = true;
if (m_foundStartCallFrame) {
if (visitor->callFrame()->codeBlock()) {
m_foundCallFrame = visitor->callFrame();
return StackVisitor::Done;
}
m_index++;
}
return StackVisitor::Continue;
}
示例5: operator
StackVisitor::Status operator()(StackVisitor& visitor)
{
if (m_currentFrame++ > 1) {
m_jitType = visitor->codeBlock()->jitType();
return StackVisitor::Done;
}
return StackVisitor::Continue;
}
示例6: 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;
}
示例7: operator
StackVisitor::Status operator()(StackVisitor& visitor)
{
if (!m_hasSkippedFirstFrame) {
m_hasSkippedFirstFrame = true;
return StackVisitor::Continue;
}
if (m_object->allowsAccessFrom(visitor->callFrame()))
m_result = JSValue::encode(m_object->prototype());
return StackVisitor::Done;
}
示例8: operator
StackVisitor::Status operator()(StackVisitor& visitor) const
{
m_currentFrame++;
if (m_currentFrame > m_framesToSkip) {
visitor->dump(WTF::dataFile(), Indenter(2), [&] (PrintStream& out) {
out.print("[", (m_currentFrame - m_framesToSkip - 1), "] ");
});
}
if (m_action == PrintOne && m_currentFrame > m_framesToSkip)
return StackVisitor::Done;
return StackVisitor::Continue;
}
示例9: 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;
}
示例10: 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;
}
示例11: operator
StackVisitor::Status operator()(StackVisitor& visitor)
{
m_trace.append(String::format(" %zu %s\n", visitor->index(), visitor->toString().utf8().data()));
return StackVisitor::Continue;
}
示例12: operator
StackVisitor::Status operator()(StackVisitor& visitor)
{
visitor->print(2);
return m_action == PrintAll ? StackVisitor::Continue : StackVisitor::Done;
}