Fix assertion 'mem_pools == NULL' fail in JSON.stringify
JerryScript-DCO-1.0-Signed-off-by: Roland Takacs rtakacs.u-szeged@partner.samsung.com
This commit is contained in:
committed by
Kristof Kosztyo
parent
ab47365b71
commit
cc4283b945
@@ -1014,6 +1014,10 @@ ecma_builtin_json_stringify (ecma_value_t this_arg __attr_unused___, /**< 'this'
|
||||
ecma_append_to_values_collection (context.property_list_p, item, true);
|
||||
ecma_deref_ecma_string (ecma_get_string_from_value (item));
|
||||
}
|
||||
else
|
||||
{
|
||||
ecma_free_value (item, true);
|
||||
}
|
||||
}
|
||||
|
||||
ECMA_FINALIZE (value);
|
||||
|
||||
@@ -133,6 +133,8 @@ assert (JSON.stringify (object, replacer_function) == '{"c":3,"b":"JSON","a":"FO
|
||||
filter = ["a", "b"];
|
||||
assert (JSON.stringify (object, filter) == '{"a":"JSON","b":"JSON"}');
|
||||
|
||||
assert (JSON.stringify ([], [ 'foo', 'foo' ]) === '[]');
|
||||
|
||||
number = new Number(2.2);
|
||||
number.toString = {};
|
||||
number.valueOf = [];
|
||||
|
||||
Reference in New Issue
Block a user