Fix assertion 'mem_pools == NULL' failed in Function.constructor

JerryScript-DCO-1.0-Signed-off-by: Roland Takacs [email protected]
This commit is contained in:
Roland Takacs authored and Kristof Kosztyo committed 2015-08-10 11:29:51 +02:00
1 parent b7d3189ac3
commit f10a48df96
2 files changed
+18

No files matched your search

+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
{