Attempts to fix StringifyJSON by clearing pending exceptions from JS API
This was SVN commit r13125.
This commit is contained in:
parent
25928f1a8b
commit
1fdaca5cec
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2012 Wildfire Games.
|
||||
/* Copyright (C) 2013 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
@ -1073,6 +1073,7 @@ std::string ScriptInterface::StringifyJSON(jsval obj, bool indent)
|
||||
Stringifier str;
|
||||
if (!JS_Stringify(m->m_cx, &obj, NULL, indent ? INT_TO_JSVAL(2) : JSVAL_VOID, &Stringifier::callback, &str))
|
||||
{
|
||||
JS_ClearPendingException(m->m_cx);
|
||||
LOGERROR(L"StringifyJSON failed");
|
||||
return "";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user