예제 #1
0
파일: Values.cpp 프로젝트: CWYQ/node
String16 Value::toJSONString() const
{
    String16Builder result;
    result.reserveCapacity(512);
    writeJSON(&result);
    return result.toString();
}
예제 #2
0
String16 V8StackTraceImpl::toString() const
{
    String16Builder stackTrace;
    for (size_t i = 0; i < m_frames.size(); ++i) {
        const Frame& frame = m_frames[i];
        stackTrace.append("\n    at " + (frame.functionName().length() ? frame.functionName() : "(anonymous function)"));
        stackTrace.append(" (");
        stackTrace.append(frame.sourceURL());
        stackTrace.append(':');
        stackTrace.append(String16::fromInteger(frame.lineNumber()));
        stackTrace.append(':');
        stackTrace.append(String16::fromInteger(frame.columnNumber()));
        stackTrace.append(')');
    }
    return stackTrace.toString();
}