Fix #739 (test failures).

Use JSON in debug serializer output unless it fails due to e.g. cyclic
values, in which case use toSource.
Disable file stats code by default, since its output isn't used.

This was SVN commit r8975.
This commit is contained in:
Ykkrosh
2011-02-24 00:32:38 +00:00
parent 059a53dd37
commit f6c1d98c9a
9 changed files with 107 additions and 19 deletions
@@ -149,9 +149,9 @@ void CDebugSerializer::PutString(const char* name, const std::string& value)
void CDebugSerializer::PutScriptVal(const char* name, jsval value)
{
std::string source = m_ScriptInterface.StringifyJSON(value, true);
std::wstring source = m_ScriptInterface.ToString(value, true);
m_Stream << INDENT << name << ": " << source << "\n";
m_Stream << INDENT << name << ": " << utf8_from_wstring(source) << "\n";
}
void CDebugSerializer::PutRaw(const char* name, const u8* data, size_t len)