Add basic replay recorder/player to help debugging and performance testing.

This was SVN commit r7863.
This commit is contained in:
Ykkrosh committed 2010-08-06 22:16:05 +00:00
1 parent ea8e5a7598
commit 91cd032827
10 files changed
+311 -12

No files matched your search

+2 -2
View File
@@ -669,10 +669,10 @@ struct Stringifier
std::stringstream stream;
};
std::string ScriptInterface::StringifyJSON(jsval obj)
std::string ScriptInterface::StringifyJSON(jsval obj, bool indent)
{
Stringifier str;
if (!JS_Stringify(m->m_cx, &obj, NULL, INT_TO_JSVAL(2), &Stringifier::callback, &str))
if (!JS_Stringify(m->m_cx, &obj, NULL, indent ? INT_TO_JSVAL(2) : JSVAL_VOID, &Stringifier::callback, &str))
{
LOGERROR(L"StringifyJSON failed");
return "";