Fix assertion 'mem_pools == NULL' failed in Function.constructor
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
b7d3189ac3
commit
f10a48df96
@@ -131,6 +131,10 @@ ecma_builtin_function_helper_get_arguments (const ecma_value_t *arguments_list_p
|
||||
{
|
||||
ret_value = ecma_make_normal_completion_value (ecma_make_string_value (arguments_str_p));
|
||||
}
|
||||
else
|
||||
{
|
||||
ecma_deref_ecma_string (arguments_str_p);
|
||||
}
|
||||
|
||||
return ret_value;
|
||||
} /* ecma_builtin_function_helper_get_arguments */
|
||||
|
||||
@@ -98,6 +98,20 @@ catch (e)
|
||||
assert (e instanceof TypeError);
|
||||
}
|
||||
|
||||
var p = { toString : function() { throw 1; } };
|
||||
var body = { toString : function() { throw "body"; } };
|
||||
|
||||
try
|
||||
{
|
||||
new Function (p, body);
|
||||
// Should not be reached.
|
||||
assert (false);
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
assert (e === 1);
|
||||
}
|
||||
|
||||
// Check SyntaxError handling
|
||||
try
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user