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:
Roland Takacs
2015-08-06 14:22:09 +02:00
committed by Kristof Kosztyo
parent b7d3189ac3
commit f10a48df96
2 changed files with 18 additions and 0 deletions
+14
View File
@@ -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
{