When an empty object is created and retured by:
function Test() { return {}; }
and then used at C# it contains the following properties:
__defineGetter__
__defineSetter__
__lookupGetter__
__lookupSetter__
__proto__
constructor
hasOwnProperty
isPrototypeOf
propertyIsEnumerable
toLocaleString
toString
valueOf
When such object is for instance serialized using Newtonsoft.Json.JsonConvert.SerializeObject and exception Process is terminated due to StackOverflowException occurs.
The same code at version 5.5.1 returned a real empty object without these properties and the serialization worked as expected.