本文整理汇总了C++中PassRefPtrWillBeRawPtr::at方法的典型用法代码示例。如果您正苦于以下问题:C++ PassRefPtrWillBeRawPtr::at方法的具体用法?C++ PassRefPtrWillBeRawPtr::at怎么用?C++ PassRefPtrWillBeRawPtr::at使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PassRefPtrWillBeRawPtr
的用法示例。
在下文中一共展示了PassRefPtrWillBeRawPtr::at方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: addMessage
void FrameConsole::addMessage(MessageSource source, MessageLevel level, const String& message, const String& url, unsigned lineNumber, unsigned columnNumber, PassRefPtrWillBeRawPtr<ScriptCallStack> callStack, ScriptState* scriptState, unsigned long requestIdentifier)
{
if (muteCount)
return;
// FIXME: This should not need to reach for the main-frame.
// Inspector code should just take the current frame and know how to walk itself.
ExecutionContext* context = m_frame.document();
if (!context)
return;
String messageURL;
if (callStack) {
messageURL = callStack->at(0).sourceURL();
InspectorInstrumentation::addMessageToConsole(context, source, LogMessageType, level, message, callStack, requestIdentifier);
} else {
messageURL = url;
InspectorInstrumentation::addMessageToConsole(context, source, LogMessageType, level, message, url, lineNumber, columnNumber, scriptState, requestIdentifier);
}
if (source == CSSMessageSource)
return;
String stackTrace;
if (callStack && m_frame.chromeClient().shouldReportDetailedMessageForSource(messageURL))
stackTrace = FrameConsole::formatStackTraceString(message, callStack);
m_frame.chromeClient().addMessageToConsole(&m_frame, source, level, message, lineNumber, messageURL, stackTrace);
}
示例2: formatStackTraceString
String FrameConsole::formatStackTraceString(const String& originalMessage, PassRefPtrWillBeRawPtr<ScriptCallStack> callStack)
{
StringBuilder stackTrace;
for (size_t i = 0; i < callStack->size(); ++i) {
const ScriptCallFrame& frame = callStack->at(i);
stackTrace.append("\n at " + (frame.functionName().length() ? frame.functionName() : "(anonymous function)"));
stackTrace.append(" (");
stackTrace.append(frame.sourceURL());
stackTrace.append(':');
stackTrace.append(String::number(frame.lineNumber()));
stackTrace.append(':');
stackTrace.append(String::number(frame.columnNumber()));
stackTrace.append(')');
}
return stackTrace.toString();
}
示例3:
ConsoleMessage::ConsoleMessage(bool, MessageSource source, MessageType type, MessageLevel level, const String& message, PassRefPtrWillBeRawPtr<ScriptCallStack> callStack, unsigned long requestIdentifier)
: m_source(source)
, m_type(type)
, m_level(level)
, m_message(message)
, m_scriptState(0)
, m_arguments(nullptr)
, m_line(0)
, m_column(0)
, m_requestId(IdentifiersFactory::requestId(requestIdentifier))
, m_timestamp(WTF::currentTime())
{
if (callStack && callStack->size()) {
const ScriptCallFrame& frame = callStack->at(0);
m_url = frame.sourceURL();
m_line = frame.lineNumber();
m_column = frame.columnNumber();
}
m_callStack = callStack;
}