当前位置: 首页>>代码示例>>C++>>正文


C++ PassRefPtrWillBeRawPtr::at方法代码示例

本文整理汇总了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);
}
开发者ID:Drakey83,项目名称:steamlink-sdk,代码行数:29,代码来源:FrameConsole.cpp

示例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();
}
开发者ID:darktears,项目名称:blink-crosswalk,代码行数:17,代码来源:FrameConsole.cpp

示例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;
}
开发者ID:Drakey83,项目名称:steamlink-sdk,代码行数:20,代码来源:ConsoleMessage.cpp


注:本文中的PassRefPtrWillBeRawPtr::at方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。